diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-05-28 11:48:37 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-05-28 11:48:37 +0000 |
commit | e260b2b08a828c0b4a1b53b16e05a9b18aea6a7c (patch) | |
tree | 8a545287bed415a3c495786ad49968091de563b3 /llvm/lib | |
parent | 41112a170346f24598a22f8083f523814b24e813 (diff) | |
download | bcm5719-llvm-e260b2b08a828c0b4a1b53b16e05a9b18aea6a7c.tar.gz bcm5719-llvm-e260b2b08a828c0b4a1b53b16e05a9b18aea6a7c.zip |
Erase instructions _after_ checking their type.
llvm-svn: 132256
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/DwarfEHPrepare.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp index 6a53e693370..873ddd20b8c 100644 --- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp +++ b/llvm/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; } |