[llvm-commits] [llvm] r132256 - /llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat May 28 04:48:37 PDT 2011
Author: d0k
Date: Sat May 28 06:48:37 2011
New Revision: 132256
URL: http://llvm.org/viewvc/llvm-project?rev=132256&view=rev
Log:
Erase instructions _after_ checking their type.
Modified:
llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp?rev=132256&r1=132255&r2=132256&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp Sat May 28 06:48:37 2011
@@ -532,13 +532,14 @@
if (isa<UnwindInst>(RI))
new UnreachableInst(RI->getContext(), RI);
- // Nuke the resume instruction.
- RI->eraseFromParent();
-
if (isa<UnwindInst>(RI))
++NumUnwindsLowered;
else
++NumResumesLowered;
+
+ // Nuke the resume instruction.
+ RI->eraseFromParent();
+
Changed = true;
}
More information about the llvm-commits
mailing list