projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06a8d54
)
Erase instructions _after_ checking their type.
author
Benjamin Kramer
<benny.kra@googlemail.com>
Sat, 28 May 2011 11:48:37 +0000
(11:48 +0000)
committer
Benjamin Kramer
<benny.kra@googlemail.com>
Sat, 28 May 2011 11:48:37 +0000
(11:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132256
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/DwarfEHPrepare.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/DwarfEHPrepare.cpp
b/lib/CodeGen/DwarfEHPrepare.cpp
index 6a53e6933704ee57d8bef4611a164da243b4ebf0..873ddd20b8c5be7e6041779d81ecd9005971e078 100644
(file)
--- a/
lib/CodeGen/DwarfEHPrepare.cpp
+++ b/
lib/CodeGen/DwarfEHPrepare.cpp
@@
-532,13
+532,14
@@
bool DwarfEHPrepare::LowerUnwindsAndResumes() {
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;
}