mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Erase instructions _after_ checking their type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132256 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -532,13 +532,14 @@ bool DwarfEHPrepare::LowerUnwindsAndResumes() {
|
|||||||
if (isa<UnwindInst>(RI))
|
if (isa<UnwindInst>(RI))
|
||||||
new UnreachableInst(RI->getContext(), RI);
|
new UnreachableInst(RI->getContext(), RI);
|
||||||
|
|
||||||
// Nuke the resume instruction.
|
|
||||||
RI->eraseFromParent();
|
|
||||||
|
|
||||||
if (isa<UnwindInst>(RI))
|
if (isa<UnwindInst>(RI))
|
||||||
++NumUnwindsLowered;
|
++NumUnwindsLowered;
|
||||||
else
|
else
|
||||||
++NumResumesLowered;
|
++NumResumesLowered;
|
||||||
|
|
||||||
|
// Nuke the resume instruction.
|
||||||
|
RI->eraseFromParent();
|
||||||
|
|
||||||
Changed = true;
|
Changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user