Skip to content

Commit f56817c

Browse files
committed
Merging r168622: into 3.2 release branch.
Don't use iterator after being erased. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168947 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 01a2efa commit f56817c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/CodeGen/MachineCSE.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ void MachineCSE::ExitScope(MachineBasicBlock *MBB) {
429429
DEBUG(dbgs() << "Exiting: " << MBB->getName() << '\n');
430430
DenseMap<MachineBasicBlock*, ScopeType*>::iterator SI = ScopeMap.find(MBB);
431431
assert(SI != ScopeMap.end());
432-
ScopeMap.erase(SI);
433432
delete SI->second;
433+
ScopeMap.erase(SI);
434434
}
435435

436436
bool MachineCSE::ProcessBlock(MachineBasicBlock *MBB) {

0 commit comments

Comments
 (0)