aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/BasicBlockUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index cf783ca..65840a0 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -82,7 +82,7 @@ void llvm::detachDeadBlocks(
// eventually be removed (they are themselves dead).
if (!I.use_empty())
I.replaceAllUsesWith(PoisonValue::get(I.getType()));
- BB->getInstList().pop_back();
+ BB->back().eraseFromParent();
}
new UnreachableInst(BB->getContext(), BB);
assert(BB->size() == 1 &&
@@ -279,13 +279,13 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU,
if (PredecessorWithTwoSuccessors) {
// Delete the unconditional branch from BB.
- BB->getInstList().pop_back();
+ BB->back().eraseFromParent();
// Update branch in the predecessor.
PredBB_BI->setSuccessor(FallThruPath, NewSucc);
} else {
// Delete the unconditional branch from the predecessor.
- PredBB->getInstList().pop_back();
+ PredBB->back().eraseFromParent();
// Move terminator instruction.
PredBB->getInstList().splice(PredBB->end(), BB->getInstList());