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:
parent
ad67c34014
commit
ffcbcb72ef
@ -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…
Reference in New Issue
Block a user