Skip to content

Commit c421537

Browse files
committed
[NFC] PrunedLiveness: Allow user visitation.
PrunedLiveness records users and their lifetime-ending-ness. Make this available to clients by way of a visitor.
1 parent 2e348c7 commit c421537

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/swift/SIL/PrunedLiveness.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,13 @@ class PrunedLiveness {
543543
RangeIterationHelpers::MapFunctor());
544544
}
545545

546+
void visitUsers(llvm::function_ref<void(SILInstruction *, LifetimeEnding)>
547+
visitor) const {
548+
for (auto &pair : users) {
549+
visitor(pair.first, pair.second);
550+
}
551+
}
552+
546553
void print(llvm::raw_ostream &OS) const;
547554
void dump() const;
548555
};

0 commit comments

Comments
 (0)