Skip to content

Commit ed53ab7

Browse files
committed
[SIL] add Value.lifetimeEndingUses
1 parent 2a9aef9 commit ed53ab7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SwiftCompilerSources/Sources/SIL/Operand.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ extension Sequence where Element == Operand {
153153
public func getSingleUser<I: Instruction>(notOfType: I.Type) -> Instruction? {
154154
ignoreUsers(ofType: I.self).singleUse?.instruction
155155
}
156+
157+
public var lifetimeEndingUses: LazyFilterSequence<Self> {
158+
return self.lazy.filter { $0.endsLifetime }
159+
}
156160
}
157161

158162
extension OptionalBridgedOperand {

0 commit comments

Comments
 (0)