@@ -40,7 +40,7 @@ static bool constrainRange(AvailabilityRange &existing,
4040
4141bool AvailabilityContext::Info::constrainWith (const Info &other) {
4242 bool isConstrained = false ;
43- isConstrained |= constrainRange (Range , other.Range );
43+ isConstrained |= constrainRange (PlatformRange , other.PlatformRange );
4444 isConstrained |= constrainUnavailability (other.UnavailableDomains );
4545 isConstrained |= CONSTRAIN_BOOL (IsDeprecated, other.IsDeprecated );
4646
@@ -64,7 +64,8 @@ bool AvailabilityContext::Info::constrainWith(
6464 // FIXME: [availability] Support versioning for other kinds of domains.
6565 DEBUG_ASSERT (domain.isPlatform ());
6666 if (domain.isPlatform ())
67- isConstrained |= constrainRange (Range, attr.getIntroducedRange (ctx));
67+ isConstrained |=
68+ constrainRange (PlatformRange, attr.getIntroducedRange (ctx));
6869 break ;
6970 }
7071 }
@@ -121,7 +122,7 @@ bool AvailabilityContext::Info::constrainUnavailability(
121122
122123bool AvailabilityContext::Info::isContainedIn (const Info &other) const {
123124 // The available versions range be the same or smaller.
124- if (!Range .isContainedIn (other.Range ))
125+ if (!PlatformRange .isContainedIn (other.PlatformRange ))
125126 return false ;
126127
127128 // Every unavailable domain in the other context should be contained in some
@@ -147,7 +148,7 @@ bool AvailabilityContext::Info::isContainedIn(const Info &other) const {
147148}
148149
149150void AvailabilityContext::Info::Profile (llvm::FoldingSetNodeID &ID) const {
150- Range .getRawVersionRange ().Profile (ID);
151+ PlatformRange .getRawVersionRange ().Profile (ID);
151152 ID.AddInteger (UnavailableDomains.size ());
152153 for (auto domain : UnavailableDomains) {
153154 domain.Profile (ID);
@@ -186,7 +187,8 @@ AvailabilityContext::forDeploymentTarget(const ASTContext &ctx) {
186187}
187188
188189AvailabilityRange AvailabilityContext::getPlatformRange () const {
189- return storage->info .Range ;
190+ return storage->info .PlatformRange ;
191+ }
190192}
191193
192194bool AvailabilityContext::isUnavailable () const {
@@ -223,7 +225,7 @@ void AvailabilityContext::constrainWithPlatformRange(
223225 const AvailabilityRange &platformRange, const ASTContext &ctx) {
224226
225227 Info info{storage->info };
226- if (!constrainRange (info.Range , platformRange))
228+ if (!constrainRange (info.PlatformRange , platformRange))
227229 return ;
228230
229231 storage = Storage::get (info, ctx);
@@ -253,7 +255,7 @@ void AvailabilityContext::constrainWithDeclAndPlatformRange(
253255 swift::getAvailabilityConstraintsForDecl (decl, *this , flags);
254256 isConstrained |= info.constrainWith (constraints, decl->getASTContext ());
255257 isConstrained |= CONSTRAIN_BOOL (info.IsDeprecated , decl->isDeprecated ());
256- isConstrained |= constrainRange (info.Range , platformRange);
258+ isConstrained |= constrainRange (info.PlatformRange , platformRange);
257259
258260 if (!isConstrained)
259261 return ;
0 commit comments