Skip to content

Commit dc8778f

Browse files
committed
Add MarkDependenstInst.hasScopedLifetime
1 parent e8af007 commit dc8778f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,10 @@ class MarkDependenceInst : SingleValueInstruction {
10871087
public func settleToEscaping() {
10881088
bridged.MarkDependenceInst_settleToEscaping()
10891089
}
1090+
1091+
public var hasScopedLifetime: Bool {
1092+
return isNonEscaping && type.isObject && ownership == .owned && type.isEscapable(in: parentFunction)
1093+
}
10901094
}
10911095

10921096
final public class RefToBridgeObjectInst : SingleValueInstruction {

0 commit comments

Comments
 (0)