[llvm] 4e30c3d - [NFC] Cleanup: Replaces BB->getInstList().erase() with BB->erase().
Vasileios Porpodas via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 18:20:20 PST 2022
Author: Vasileios Porpodas
Date: 2022-12-01T18:19:23-08:00
New Revision: 4e30c3ddf025dacef6c233706576340719748c9f
URL: https://github.com/llvm/llvm-project/commit/4e30c3ddf025dacef6c233706576340719748c9f
DIFF: https://github.com/llvm/llvm-project/commit/4e30c3ddf025dacef6c233706576340719748c9f.diff
LOG: [NFC] Cleanup: Replaces BB->getInstList().erase() with BB->erase().
This is part of a series of cleanup patches towards making BasicBlock::getInstList() private.
Differential Revision: https://reviews.llvm.org/D139143
Added:
Modified:
llvm/lib/CodeGen/WasmEHPrepare.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/WasmEHPrepare.cpp b/llvm/lib/CodeGen/WasmEHPrepare.cpp
index 14831ab325d6b..361f185243b1d 100644
--- a/llvm/lib/CodeGen/WasmEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WasmEHPrepare.cpp
@@ -182,8 +182,7 @@ bool WasmEHPrepare::prepareThrows(Function &F) {
Changed = true;
auto *BB = ThrowI->getParent();
SmallVector<BasicBlock *, 4> Succs(successors(BB));
- auto &InstList = BB->getInstList();
- InstList.erase(std::next(BasicBlock::iterator(ThrowI)), InstList.end());
+ BB->erase(std::next(BasicBlock::iterator(ThrowI)), BB->end());
IRB.SetInsertPoint(BB);
IRB.CreateUnreachable();
eraseDeadBBsAndChildren(Succs);
More information about the llvm-commits
mailing list