@@ -2309,50 +2309,6 @@ SemanticAvailableAttr::getActiveVersion(const ASTContext &ctx) const {
2309
2309
}
2310
2310
}
2311
2311
2312
- AvailableVersionComparison
2313
- SemanticAvailableAttr::getVersionAvailability (const ASTContext &ctx) const {
2314
-
2315
- // Unconditional unavailability.
2316
- if (attr->isUnconditionallyUnavailable ())
2317
- return AvailableVersionComparison::Unavailable;
2318
-
2319
- llvm::VersionTuple queryVersion = getActiveVersion (ctx);
2320
- std::optional<llvm::VersionTuple> ObsoletedVersion = getObsoleted ();
2321
-
2322
- StringRef ObsoletedPlatform;
2323
- llvm::VersionTuple RemappedObsoletedVersion;
2324
- if (AvailabilityInference::updateObsoletedPlatformForFallback (
2325
- *this , ctx, ObsoletedPlatform, RemappedObsoletedVersion))
2326
- ObsoletedVersion = RemappedObsoletedVersion;
2327
-
2328
- // If this entity was obsoleted before or at the query platform version,
2329
- // consider it obsolete.
2330
- if (ObsoletedVersion && *ObsoletedVersion <= queryVersion)
2331
- return AvailableVersionComparison::Obsoleted;
2332
-
2333
- std::optional<llvm::VersionTuple> IntroducedVersion = getIntroduced ();
2334
- StringRef IntroducedPlatform;
2335
- llvm::VersionTuple RemappedIntroducedVersion;
2336
- if (AvailabilityInference::updateIntroducedPlatformForFallback (
2337
- *this , ctx, IntroducedPlatform, RemappedIntroducedVersion))
2338
- IntroducedVersion = RemappedIntroducedVersion;
2339
-
2340
- // If this entity was introduced after the query version and we're doing a
2341
- // platform comparison, true availability can only be determined dynamically;
2342
- // if we're doing a _language_ version check, the query version is a
2343
- // static requirement, so we treat "introduced later" as just plain
2344
- // unavailable.
2345
- if (IntroducedVersion && *IntroducedVersion > queryVersion) {
2346
- if (isSwiftLanguageModeSpecific () || isPackageDescriptionVersionSpecific ())
2347
- return AvailableVersionComparison::Unavailable;
2348
- else
2349
- return AvailableVersionComparison::PotentiallyUnavailable;
2350
- }
2351
-
2352
- // The entity is available.
2353
- return AvailableVersionComparison::Available;
2354
- }
2355
-
2356
2312
SpecializeAttr::SpecializeAttr (SourceLoc atLoc, SourceRange range,
2357
2313
TrailingWhereClause *clause, bool exported,
2358
2314
SpecializationKind kind,
0 commit comments