projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05c1f00
)
Don't use iterator after being erased.
author
Jakub Staszak
<kubastaszak@gmail.com>
Mon, 26 Nov 2012 22:14:19 +0000
(22:14 +0000)
committer
Jakub Staszak
<kubastaszak@gmail.com>
Mon, 26 Nov 2012 22:14:19 +0000
(22:14 +0000)
llvm-svn: 168622
llvm/lib/CodeGen/MachineCSE.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/MachineCSE.cpp
b/llvm/lib/CodeGen/MachineCSE.cpp
index
497e000
..
dbc41de
100644
(file)
--- a/
llvm/lib/CodeGen/MachineCSE.cpp
+++ b/
llvm/lib/CodeGen/MachineCSE.cpp
@@
-429,8
+429,8
@@
void MachineCSE::ExitScope(MachineBasicBlock *MBB) {
DEBUG(dbgs() << "Exiting: " << MBB->getName() << '\n');
DenseMap<MachineBasicBlock*, ScopeType*>::iterator SI = ScopeMap.find(MBB);
assert(SI != ScopeMap.end());
- ScopeMap.erase(SI);
delete SI->second;
+ ScopeMap.erase(SI);
}
bool MachineCSE::ProcessBlock(MachineBasicBlock *MBB) {