aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-02-27 06:21:30 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-02-27 06:21:30 +0000
commit58591b1647e0f1f213e5acd7bfa87c226ced0033 (patch)
tree4b9b79d407219ae7a97e75baf78a745c22dec8a5 /lib/Transforms/Instrumentation
parentf8b80de1a952f14921c3137545e05575ea88e4ab (diff)
downloadexternal_llvm-58591b1647e0f1f213e5acd7bfa87c226ced0033.zip
external_llvm-58591b1647e0f1f213e5acd7bfa87c226ced0033.tar.gz
external_llvm-58591b1647e0f1f213e5acd7bfa87c226ced0033.tar.bz2
Doh, fix behaviour change introduced in r176168 which is tested in clang,
not llvm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176172 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/GCOVProfiling.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index 2cc2d4b..09dea48 100644
--- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/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;