diff options
author | Vasileios Porpodas <vporpodas@google.com> | 2022-11-23 14:53:00 -0800 |
---|---|---|
committer | Vasileios Porpodas <vporpodas@google.com> | 2022-11-23 22:47:46 -0800 |
commit | af4e856fa71c6b5086aeda79bfcd954e98cef591 (patch) | |
tree | a22619357ddbe79735f53b3c8fff7a5e61ba2084 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | fbcdf4a4fb9e51039877cc92bb18407416a158d7 (diff) | |
download | llvm-af4e856fa71c6b5086aeda79bfcd954e98cef591.zip llvm-af4e856fa71c6b5086aeda79bfcd954e98cef591.tar.gz llvm-af4e856fa71c6b5086aeda79bfcd954e98cef591.tar.bz2 |
[NFC] Replaced BB->getInstList().{erase(),pop_front(),pop_back()} with eraseFromParent().
Differential Revision: https://reviews.llvm.org/D138617
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 6 |
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()); |