[llvm-branch-commits] [llvm-branch] r168947 - in /llvm/branches/release_32: ./ lib/CodeGen/MachineCSE.cpp

Pawel Wodnicki pawel at 32bitmicro.com
Thu Nov 29 14:11:02 PST 2012


Author: pawel
Date: Thu Nov 29 16:11:02 2012
New Revision: 168947

URL: http://llvm.org/viewvc/llvm-project?rev=168947&view=rev
Log:
Merging r168622: into 3.2 release branch.

Don't use iterator after being erased.

Modified:
    llvm/branches/release_32/   (props changed)
    llvm/branches/release_32/lib/CodeGen/MachineCSE.cpp

Propchange: llvm/branches/release_32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 29 16:11:02 2012
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,167718-167719,167731,167737,167743,167750,167784,167811,167817,167855,167860-167864,167875,167912,167942,167948,167966,168001,168035,168181,168186,168189,168196-168198,168227,168280,168291,168316,168319-168320,168346,168352,168354,168361,168364,168512,168765,168799,168837
+/llvm/trunk:155241,167718-167719,167731,167737,167743,167750,167784,167811,167817,167855,167860-167864,167875,167912,167942,167948,167966,168001,168035,168181,168186,168189,168196-168198,168227,168280,168291,168316,168319-168320,168346,168352,168354,168361,168364,168512,168622,168765,168799,168837

Modified: llvm/branches/release_32/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_32/lib/CodeGen/MachineCSE.cpp?rev=168947&r1=168946&r2=168947&view=diff
==============================================================================
--- llvm/branches/release_32/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/branches/release_32/lib/CodeGen/MachineCSE.cpp Thu Nov 29 16:11:02 2012
@@ -429,8 +429,8 @@
   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) {





More information about the llvm-branch-commits mailing list