Skip to content

Commit 1f7bfd8

Browse files
committed
SwiftCompilerSources: expose Swift Operand.endsLifetime
1 parent 1c8f295 commit 1f7bfd8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

SwiftCompilerSources/Sources/SIL/Operand.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ public struct Operand : CustomStringConvertible, NoReflectionChildren {
3535
/// True if the operand is used to describe a type dependency, but it's not
3636
/// used as value.
3737
public var isTypeDependent: Bool { bridged.isTypeDependent() }
38-
38+
39+
public var endsLifetime: Bool { bridged.isLifetimeEnding() }
40+
3941
public var description: String { "operand #\(index) of \(instruction)" }
4042
}
4143

include/swift/SIL/SILBridging.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ struct BridgedOperand {
124124

125125
bool isTypeDependent() const { return op->isTypeDependent(); }
126126

127+
bool isLifetimeEnding() const { return op->isLifetimeEnding(); }
128+
127129
SWIFT_IMPORT_UNSAFE
128130
inline OptionalBridgedOperand getNextUse() const;
129131

0 commit comments

Comments
 (0)