[PATCH] D140162: [NFC] Cleanup: Function::getBasicBlockList() and Function::getSublistAccess() are now private
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 16:30:25 PST 2022
vporpo updated this revision to Diff 483386.
vporpo added a comment.
Rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140162/new/
https://reviews.llvm.org/D140162
Files:
llvm/include/llvm/IR/Function.h
Index: llvm/include/llvm/IR/Function.h
===================================================================
--- llvm/include/llvm/IR/Function.h
+++ llvm/include/llvm/IR/Function.h
@@ -719,6 +719,15 @@
/// \Returns \p ToIt.
Function::iterator erase(Function::iterator FromIt, Function::iterator ToIt);
+private:
+ // These need access to the underlying BB list.
+ friend void BasicBlock::removeFromParent();
+ friend iplist<BasicBlock>::iterator BasicBlock::eraseFromParent();
+ template <class BB_t, class BB_i_t, class BI_t, class II_t>
+ friend class InstIterator;
+ friend class llvm::SymbolTableListTraits<llvm::BasicBlock>;
+ friend class llvm::ilist_node_with_parent<llvm::BasicBlock, llvm::Function>;
+
/// Get the underlying elements of the Function... the basic block list is
/// empty for external functions.
///
@@ -732,6 +741,7 @@
return &Function::BasicBlocks;
}
+public:
const BasicBlock &getEntryBlock() const { return front(); }
BasicBlock &getEntryBlock() { return front(); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140162.483386.patch
Type: text/x-patch
Size: 1062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221216/55570aef/attachment.bin>
More information about the llvm-commits
mailing list