@@ -51,19 +51,21 @@ class AvailabilityConstraint {
51
51
// / constraint.
52
52
Obsoleted,
53
53
54
- // / The declaration is only available in a later version. For example,
55
- // / the declaration might only be introduced in the Swift 6 language mode
56
- // / while the module is being compiled in the Swift 5 language mode.
57
- IntroducedInLaterVersion,
58
-
59
- // / The declaration is referenced in a context that does not have an
60
- // / adequate minimum version constraint. For example, a reference to a
61
- // / declaration that is introduced in macOS 13 from a context that may
62
- // / execute on earlier versions of macOS has this constraint. This
63
- // / kind of constraint can be satisfied by tightening the minimum
64
- // / version of the context with `if #available(...)` or by adding or
65
- // / adjusting an `@available` attribute.
66
- IntroducedInLaterDynamicVersion,
54
+ // / The declaration is not available in the deployment configuration
55
+ // / specified for this compilation. For example, the declaration might only
56
+ // / be introduced in the Swift 6 language mode while the module is being
57
+ // / compiled in the Swift 5 language mode. These availability constraints
58
+ // / cannot be satisfied by adding constraining contextual availability using
59
+ // / `@available` attributes or `if #available` queries.
60
+ UnavailableForDeployment,
61
+
62
+ // / The declaration is referenced in a context that does not have adequate
63
+ // / availability constraints. For example, a reference to a declaration that
64
+ // / was introduced in macOS 13 from a context that may execute on earlier
65
+ // / versions of macOS cannot satisfy this constraint. The constraint
66
+ // / can be satisfied, though, by introducing an `@available` attribute or an
67
+ // / `if #available(...)` query.
68
+ PotentiallyUnavailable,
67
69
};
68
70
69
71
// / Classifies constraints into different high level categories.
@@ -93,14 +95,13 @@ class AvailabilityConstraint {
93
95
}
94
96
95
97
static AvailabilityConstraint
96
- introducedInLaterVersion (SemanticAvailableAttr attr) {
97
- return AvailabilityConstraint (Reason::IntroducedInLaterVersion , attr);
98
+ unavailableForDeployment (SemanticAvailableAttr attr) {
99
+ return AvailabilityConstraint (Reason::UnavailableForDeployment , attr);
98
100
}
99
101
100
102
static AvailabilityConstraint
101
- introducedInLaterDynamicVersion (SemanticAvailableAttr attr) {
102
- return AvailabilityConstraint (Reason::IntroducedInLaterDynamicVersion,
103
- attr);
103
+ potentiallyUnavailable (SemanticAvailableAttr attr) {
104
+ return AvailabilityConstraint (Reason::PotentiallyUnavailable, attr);
104
105
}
105
106
106
107
Reason getReason () const { return attrAndReason.getInt (); }
@@ -112,9 +113,9 @@ class AvailabilityConstraint {
112
113
switch (getReason ()) {
113
114
case Reason::UnconditionallyUnavailable:
114
115
case Reason::Obsoleted:
115
- case Reason::IntroducedInLaterVersion :
116
+ case Reason::UnavailableForDeployment :
116
117
return Kind::Unavailable;
117
- case Reason::IntroducedInLaterDynamicVersion :
118
+ case Reason::PotentiallyUnavailable :
118
119
return Kind::PotentiallyAvailable;
119
120
}
120
121
}
0 commit comments