Doh, fix behaviour change introduced in r176168 which is tested in clang,

not llvm.

llvm-svn: 176172
This commit is contained in:
Nick Lewycky 2013-02-27 06:21:30 +00:00
parent 6489b3c2b7
commit c5554019e1

View File

@ -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;