[PATCH] D141731: [NFC] Makes mutable Function::getBasicBlockList() private
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 13 14:47:02 PST 2023
vporpo created this revision.
Herald added a project: All.
vporpo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Any updates to the BB list should go through the appropriate member functions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141731
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
@@ -725,8 +725,11 @@
/// of functions to modify the list, including Function::splice(),
/// Function::erase(), Function::insert() etc.
const BasicBlockListType &getBasicBlockList() const { return BasicBlocks; }
- BasicBlockListType &getBasicBlockList() { return BasicBlocks; }
+private:
+ BasicBlockListType &getBasicBlockList() { return BasicBlocks; }
+
+public:
static BasicBlockListType Function::*getSublistAccess(BasicBlock*) {
return &Function::BasicBlocks;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141731.489129.patch
Type: text/x-patch
Size: 681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230113/80bd38a4/attachment.bin>
More information about the llvm-commits
mailing list