We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed53ab7 commit 53d3c63Copy full SHA for 53d3c63
SwiftCompilerSources/Sources/SIL/Value.swift
@@ -75,7 +75,16 @@ public enum Ownership {
75
/// points in the SSA graph, where more information about the value is
76
/// statically available on some control flow paths.
77
case none
78
-
+
79
+ public var hasLifetime: Bool {
80
+ switch self {
81
+ case .owned, .guaranteed:
82
+ return true
83
+ case .unowned, .none:
84
+ return false
85
+ }
86
87
88
public init(bridged: BridgedValue.Ownership) {
89
switch bridged {
90
case .Unowned: self = .unowned
0 commit comments