1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

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

This commit is contained in:
Roman Lebedev 2021-05-19 11:44:43 +03:00
parent 6d117dab29
commit e411ba6370

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