Skip to content

Commit 7e4779e

Browse files
committed
[NFC] BasicBlockWorklist: Add ::getVisited.
Expose the BasicBlockSet of visited blocks for use by code responsible for testing set membership. Return only a const reference so that clients can't easily mess up the worklist.
1 parent 1f034c4 commit 7e4779e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/swift/SIL/BasicBlockDatastructures.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ class BasicBlockWorklist {
123123

124124
/// Returns true if \p block was visited, i.e. has been added to the worklist.
125125
bool isVisited(SILBasicBlock *block) const { return visited.contains(block); }
126+
127+
BasicBlockSet const &getVisited() const { return visited; }
126128
};
127129

128130

0 commit comments

Comments
 (0)