From c5554019e185e11e4460b3c84720cf4a9452583d Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 27 Feb 2013 06:21:30 +0000 Subject: [PATCH] Doh, fix behaviour change introduced in r176168 which is tested in clang, not llvm. llvm-svn: 176172 --- lib/Transforms/Instrumentation/GCOVProfiling.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;