PHI->removeIncomingValue may remove PHInode.

Increment iterator in advance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2008-03-27 17:32:46 +00:00
parent 156b2df00d
commit 4a3c0ac798

View File

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