mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-10 08:40:41 +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:
parent
06a8d54967
commit
33858016ea
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user