[llvm] r176172 - Doh, fix behaviour change introduced in r176168 which is tested in clang,

Nick Lewycky nicholas at mxc.ca
Tue Feb 26 22:21:30 PST 2013


Author: nicholas
Date: Wed Feb 27 00:21:30 2013
New Revision: 176172

URL: http://llvm.org/viewvc/llvm-project?rev=176172&view=rev
Log:
Doh, fix behaviour change introduced in r176168 which is tested in clang,
not llvm.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp?rev=176172&r1=176171&r2=176172&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp Wed Feb 27 00:21:30 2013
@@ -735,7 +735,9 @@ void GCOVProfiler::insertIndirectCounter
   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;





More information about the llvm-commits mailing list