Fix previous patch

llvm-svn: 12811
This commit is contained in:
Chris Lattner 2004-04-10 07:27:48 +00:00
parent 6149ac8991
commit 5093213c40
1 changed files with 5 additions and 7 deletions

View File

@ -145,15 +145,13 @@ bool ADCE::dropReferencesOfDeadInstructionsInLiveBlock(BasicBlock *BB) {
//
PN->replaceAllUsesWith(Constant::getNullValue(PN->getType()));
} else {
if (isa<CallInst>(I))
++NumCallRemoved;
else
++NumInstRemoved;
// Delete the instruction...
BB->getInstList().erase(I++);
++I;
BB->getInstList().erase(PN);
Changed = true;
++NumInstRemoved;
} else {
++I;
}
} else {
++I;