mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Don't increment invalid iterator.
llvm-svn: 42178
This commit is contained in:
parent
425fe2a97b
commit
57b0b31257
@ -928,8 +928,9 @@ void LoopIndexSplit::removeBlocks(BasicBlock *DeadBB, Loop *LP,
|
|||||||
while (!WorkList.empty()) {
|
while (!WorkList.empty()) {
|
||||||
BasicBlock *BB = WorkList.back(); WorkList.pop_back();
|
BasicBlock *BB = WorkList.back(); WorkList.pop_back();
|
||||||
for(BasicBlock::iterator BBI = BB->begin(), BBE = BB->end();
|
for(BasicBlock::iterator BBI = BB->begin(), BBE = BB->end();
|
||||||
BBI != BBE; ++BBI) {
|
BBI != BBE; ) {
|
||||||
Instruction *I = BBI;
|
Instruction *I = BBI;
|
||||||
|
++BBI;
|
||||||
I->replaceAllUsesWith(UndefValue::get(I->getType()));
|
I->replaceAllUsesWith(UndefValue::get(I->getType()));
|
||||||
I->eraseFromParent();
|
I->eraseFromParent();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user