summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/GCOVProfiling.cpp
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-24 17:20:04 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-24 17:20:04 +0000
commit2f87640b86315beab8a5671cc23f524e59c58bd3 (patch)
treecb18e28b2d6aa7b36dcca2f78cab41f315409d51 /lib/Transforms/Instrumentation/GCOVProfiling.cpp
parentaa76e9e2cf50af190de90bc778b7f7e42ef9ceff (diff)
downloadllvm-2f87640b86315beab8a5671cc23f524e59c58bd3.tar.gz
llvm-2f87640b86315beab8a5671cc23f524e59c58bd3.tar.bz2
llvm-2f87640b86315beab8a5671cc23f524e59c58bd3.tar.xz
Delete a directory that wasn't supposed to be checked in yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166591 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/GCOVProfiling.cpp')
-rw-r--r--lib/Transforms/Instrumentation/GCOVProfiling.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index e9192e5cdd..3998c8bb22 100644
--- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -586,8 +586,8 @@ Constant *GCOVProfiler::getIncrementIndirectCounterFunc() {
Type *Int32Ty = Type::getInt32Ty(*Ctx);
Type *Int64Ty = Type::getInt64Ty(*Ctx);
Type *Args[] = {
- Int32Ty->getPointerTo(), // uint32_t *predecessor
- Int64Ty->getPointerTo()->getPointerTo() // uint64_t **counters
+ Int32Ty->getPointerTo(Int32Ty), // uint32_t *predecessor
+ Int64Ty->getPointerTo(Int64Ty)->getPointerTo(Int64Ty) // uint64_t **counters
};
FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), Args, false);
return M->getOrInsertFunction("__llvm_gcov_indirect_counter_increment", FTy);
@@ -733,7 +733,8 @@ void GCOVProfiler::insertIndirectCounterIncrement() {
Value *GEP = Builder.CreateGEP(Arg, ZExtPred);
Value *Counter = Builder.CreateLoad(GEP, "counter");
Cond = Builder.CreateICmpEQ(Counter,
- Constant::getNullValue(Int64Ty->getPointerTo()));
+ Constant::getNullValue(
+ Int64Ty->getPointerTo(Counter->getType())));
Builder.CreateCondBr(Cond, Exit, CounterEnd);
// ++*counter;