[PATCH] D139143: [NFC] Cleanup: Replaces BB->getInstList().erase() with BB->erase().

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 18:20:35 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4e30c3ddf025: [NFC] Cleanup: Replaces BB->getInstList().erase() with BB->erase(). (authored by vporpo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139143/new/

https://reviews.llvm.org/D139143

Files:
  llvm/lib/CodeGen/WasmEHPrepare.cpp


Index: llvm/lib/CodeGen/WasmEHPrepare.cpp
===================================================================
--- llvm/lib/CodeGen/WasmEHPrepare.cpp
+++ llvm/lib/CodeGen/WasmEHPrepare.cpp
@@ -182,8 +182,7 @@
     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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139143.479496.patch
Type: text/x-patch
Size: 606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221202/7c3e7f80/attachment.bin>


More information about the llvm-commits mailing list