PHI->removeIncomingValue may remove PHInode.

Increment iterator in advance.

llvm-svn: 48890
This commit is contained in:
Devang Patel 2008-03-27 17:32:46 +00:00
parent 64b95a024e
commit eb1e3fcbe0
1 changed files with 2 additions and 1 deletions

View File

@ -1647,8 +1647,9 @@ void LoopIndexSplit::updatePHINodes(BasicBlock *ExitBB, BasicBlock *Latch,
Loop *LP) { Loop *LP) {
for (BasicBlock::iterator BI = ExitBB->begin(), BE = ExitBB->end(); for (BasicBlock::iterator BI = ExitBB->begin(), BE = ExitBB->end();
BI != BE; ++BI) { BI != BE; ) {
PHINode *PN = dyn_cast<PHINode>(BI); PHINode *PN = dyn_cast<PHINode>(BI);
++BI;
if (!PN) if (!PN)
break; break;