Skip to content

Commit dd0f360

Browse files
committed
EscapeUtils: add an Value.isEscapingWhenWalkingDown API
1 parent 86d337b commit dd0f360

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SwiftCompilerSources/Sources/Optimizer/Utilities/EscapeUtils.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ extension Value {
154154
return self.at(SmallProjectionPath()).isEscaping(using: visitor, context)
155155
}
156156

157+
func isEscapingWhenWalkingDown<V: EscapeVisitor>(using visitor: V = DefaultVisitor(),
158+
_ context: PassContext) -> Bool {
159+
return self.at(SmallProjectionPath()).isEscapingWhenWalkingDown(using: visitor, context)
160+
}
161+
157162
/// The un-projected version of `ProjectedValue.visit()`.
158163
func visit<V: EscapeVisitorWithResult>(using visitor: V, _ context: PassContext) -> V.Result? {
159164
return self.at(SmallProjectionPath()).visit(using: visitor, context)

0 commit comments

Comments
 (0)