From: Nick Lewycky Date: Wed, 27 Feb 2013 06:21:30 +0000 (+0000) Subject: Doh, fix behaviour change introduced in r176168 which is tested in clang, X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=58591b1647e0f1f213e5acd7bfa87c226ced0033;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 2cc2d4b9df0..09dea48e398 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;