diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-02-27 06:21:30 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-02-27 06:21:30 +0000 |
commit | 625f3956632dfa940b08afe562fb4a9f732bf7fa (patch) | |
tree | 2c679976f6a505821994bf00fa0c327f5819105a /llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | |
parent | 08ab877cc77fe85aa3da4bc03b975487098aa658 (diff) | |
download | bcm5719-llvm-625f3956632dfa940b08afe562fb4a9f732bf7fa.tar.gz bcm5719-llvm-625f3956632dfa940b08afe562fb4a9f732bf7fa.zip |
Doh, fix behaviour change introduced in r176168 which is tested in clang,
not llvm.
llvm-svn: 176172
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 2cc2d4b9df0..09dea48e398 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -735,7 +735,9 @@ void GCOVProfiler::insertIndirectCounterIncrement() { Arg->setName("counters"); Value *GEP = Builder.CreateGEP(Arg, ZExtPred); Value *Counter = Builder.CreateLoad(GEP, "counter"); - Cond = Builder.CreateICmpEQ(Counter, Builder.getInt64(0)); + Cond = Builder.CreateICmpEQ(Counter, + Constant::getNullValue( + Builder.getInt64Ty()->getPointerTo())); Builder.CreateCondBr(Cond, Exit, CounterEnd); // ++*counter; |