[NFCI][SimplifyCFG] simplifyCommonResume(): use DeleteDeadBlock()

This commit is contained in:
Roman Lebedev 2021-05-19 11:44:43 +03:00
parent f24f140290
commit a4eb24c688
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 2 additions and 6 deletions

View File

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