From 58591b1647e0f1f213e5acd7bfa87c226ced0033 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 27 Feb 2013 06:21:30 +0000 Subject: 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 --- lib/Transforms/Instrumentation/GCOVProfiling.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Transforms/Instrumentation/GCOVProfiling.cpp') diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 2cc2d4b9df..09dea48e39 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; -- cgit v1.2.3