mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Don't increment invalid iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d7944ca61c
commit
d15dd8c525
@ -928,8 +928,9 @@ void LoopIndexSplit::removeBlocks(BasicBlock *DeadBB, Loop *LP,
|
||||
while (!WorkList.empty()) {
|
||||
BasicBlock *BB = WorkList.back(); WorkList.pop_back();
|
||||
for(BasicBlock::iterator BBI = BB->begin(), BBE = BB->end();
|
||||
BBI != BBE; ++BBI) {
|
||||
BBI != BBE; ) {
|
||||
Instruction *I = BBI;
|
||||
++BBI;
|
||||
I->replaceAllUsesWith(UndefValue::get(I->getType()));
|
||||
I->eraseFromParent();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user