diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 0dc9545..13a2f30 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1150,12 +1150,11 @@ bool llvm::TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB, assert(succ_empty(BB) && "The successor list of BB isn't empty before " "applying corresponding DTU updates."); - if (DTU) { + if (DTU) DTU->applyUpdates(Updates); - DTU->deleteBB(BB); - } else { - BB->eraseFromParent(); // Delete the old basic block. - } + + DeleteDeadBlock(BB, DTU); + return true; } |