[PATCH] D139905: [NFC] Cleanup: BasicBlock::getInstList() is now private.

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 09:33:42 PST 2022


aeubanks added inline comments.


================
Comment at: llvm/include/llvm/IR/BasicBlock.h:92
 
+  // These functions need access to the instructin list.
+  friend void Instruction::removeFromParent();
----------------
instruction


================
Comment at: llvm/include/llvm/IR/BasicBlock.h:385
   /// Returns a pointer to a member of the instruction list.
-  static InstListType BasicBlock::*getSublistAccess(Instruction*) {
+  static InstListType BasicBlock::*getSublistAccess(Instruction *) {
     return &BasicBlock::InstList;
----------------
this should also be private, although I'd hope people don't abuse this

looks like it's used as part of `ilist_node_with_parent`, maybe friend class that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139905



More information about the llvm-commits mailing list