forked from OSchip/llvm-project
[NFCI][SimplifyCFG] simplifyCommonResume(): use DeleteDeadBlock()
This commit is contained in:
parent
f24f140290
commit
a4eb24c688
|
@ -4401,12 +4401,8 @@ bool SimplifyCFGOpt::simplifyCommonResume(ResumeInst *RI) {
|
|||
}
|
||||
|
||||
// Delete the resume block if all its predecessors have been removed.
|
||||
if (pred_empty(BB)) {
|
||||
if (DTU)
|
||||
DTU->deleteBB(BB);
|
||||
else
|
||||
BB->eraseFromParent();
|
||||
}
|
||||
if (pred_empty(BB))
|
||||
DeleteDeadBlock(BB, DTU);
|
||||
|
||||
return !TrivialUnwindBlocks.empty();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue