diff options
author | Pawel Wodnicki <pawel@32bitmicro.com> | 2012-11-29 22:11:02 +0000 |
---|---|---|
committer | Pawel Wodnicki <pawel@32bitmicro.com> | 2012-11-29 22:11:02 +0000 |
commit | f56817cfb593cb32d2fb84129fc31013bd9ac7f3 (patch) | |
tree | 3dd9c9d37252298b3507f514b2f521774a38e752 | |
parent | 01a2efa74ef4308167f3ea5342b03dc1dc8e9b8b (diff) | |
download | llvm-f56817cfb593cb32d2fb84129fc31013bd9ac7f3.tar.gz llvm-f56817cfb593cb32d2fb84129fc31013bd9ac7f3.tar.bz2 llvm-f56817cfb593cb32d2fb84129fc31013bd9ac7f3.tar.xz |
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
-rw-r--r-- | lib/CodeGen/MachineCSE.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp index 497e000b68..dbc41defeb 100644 --- a/lib/CodeGen/MachineCSE.cpp +++ b/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) { |