@@ -51,19 +51,21 @@ class AvailabilityConstraint {
5151 // / constraint.
5252 Obsoleted,
5353
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,
6769 };
6870
6971 // / Classifies constraints into different high level categories.
@@ -93,14 +95,13 @@ class AvailabilityConstraint {
9395 }
9496
9597 static AvailabilityConstraint
96- introducedInLaterVersion (SemanticAvailableAttr attr) {
97- return AvailabilityConstraint (Reason::IntroducedInLaterVersion , attr);
98+ unavailableForDeployment (SemanticAvailableAttr attr) {
99+ return AvailabilityConstraint (Reason::UnavailableForDeployment , attr);
98100 }
99101
100102 static AvailabilityConstraint
101- introducedInLaterDynamicVersion (SemanticAvailableAttr attr) {
102- return AvailabilityConstraint (Reason::IntroducedInLaterDynamicVersion,
103- attr);
103+ potentiallyUnavailable (SemanticAvailableAttr attr) {
104+ return AvailabilityConstraint (Reason::PotentiallyUnavailable, attr);
104105 }
105106
106107 Reason getReason () const { return attrAndReason.getInt (); }
@@ -112,9 +113,9 @@ class AvailabilityConstraint {
112113 switch (getReason ()) {
113114 case Reason::UnconditionallyUnavailable:
114115 case Reason::Obsoleted:
115- case Reason::IntroducedInLaterVersion :
116+ case Reason::UnavailableForDeployment :
116117 return Kind::Unavailable;
117- case Reason::IntroducedInLaterDynamicVersion :
118+ case Reason::PotentiallyUnavailable :
118119 return Kind::PotentiallyAvailable;
119120 }
120121 }
0 commit comments