1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Erase instructions _after_ checking their type.

llvm-svn: 132256
This commit is contained in:
Benjamin Kramer 2011-05-28 11:48:37 +00:00
parent ad67c34014
commit ffcbcb72ef

View File

@ -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;
}