[PATCH] D140237: [IR][NFC] Add BasicBlock::erase(Instruction *I) for erasing a single Instruction.

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 12:40:48 PST 2022


vporpo added a comment.

> If the intention is to make it behave like a container, then the erase method should take an iterator.
> But who would possibly use it if it requires a BB reference to call the method? It is kind of easier and safer to just I->eraseFromParent().
> I don't mind adding this, just don't see how it can be useful.

I agree, I think it is not very useful. I will abandon the patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140237



More information about the llvm-commits mailing list