Skip to content

Commit 87f9dbb

Browse files
committed
[SIL] add Value.lifetimeEndingUses
1 parent 62ff47b commit 87f9dbb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SwiftCompilerSources/Sources/SIL/Operand.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ public struct Operand : CustomStringConvertible, NoReflectionChildren {
4848
public var description: String { "operand #\(index) of \(instruction)" }
4949
}
5050

51+
extension Value {
52+
public typealias FilteredUses = LazyFilterSequence<UseList>
53+
public var lifetimeEndingUses: FilteredUses {
54+
return uses.lazy.filter { $0.endsLifetime }
55+
}
56+
}
57+
5158
public struct OperandArray : RandomAccessCollection, CustomReflectable {
5259
private let base: OptionalBridgedOperand
5360
public let count: Int

0 commit comments

Comments
 (0)