@@ -439,15 +439,12 @@ static bool isShortAvailable(const SemanticAvailableAttr &attr) {
439439 if (!attr.getRename ().empty ())
440440 return false ;
441441
442- switch (parsedAttr->getPlatformAgnosticAvailability ()) {
443- case PlatformAgnosticAvailabilityKind::Deprecated:
444- case PlatformAgnosticAvailabilityKind::Unavailable:
445- case PlatformAgnosticAvailabilityKind::UnavailableInSwift:
446- case PlatformAgnosticAvailabilityKind::NoAsync:
442+ switch (parsedAttr->getKind ()) {
443+ case AvailableAttr::Kind::NoAsync:
444+ case AvailableAttr::Kind::Deprecated:
445+ case AvailableAttr::Kind::Unavailable:
447446 return false ;
448- case PlatformAgnosticAvailabilityKind::None:
449- case PlatformAgnosticAvailabilityKind::SwiftVersionSpecific:
450- case PlatformAgnosticAvailabilityKind::PackageDescriptionVersionSpecific:
447+ case AvailableAttr::Kind::Default:
451448 return true ;
452449 }
453450
@@ -2238,42 +2235,42 @@ OriginallyDefinedInAttr *OriginallyDefinedInAttr::clone(ASTContext &C,
22382235}
22392236
22402237bool AvailableAttr::isUnconditionallyUnavailable () const {
2241- switch (getPlatformAgnosticAvailability ()) {
2242- case PlatformAgnosticAvailabilityKind::None:
2243- case PlatformAgnosticAvailabilityKind::Deprecated:
2244- case PlatformAgnosticAvailabilityKind::SwiftVersionSpecific:
2245- case PlatformAgnosticAvailabilityKind::PackageDescriptionVersionSpecific:
2246- case PlatformAgnosticAvailabilityKind::NoAsync:
2238+ switch (getKind ()) {
2239+ case Kind::Default:
2240+ case Kind::Deprecated:
2241+ case Kind::NoAsync:
22472242 return false ;
2248-
2249- case PlatformAgnosticAvailabilityKind::Unavailable:
2250- case PlatformAgnosticAvailabilityKind::UnavailableInSwift:
2243+ case Kind::Unavailable:
22512244 return true ;
22522245 }
22532246
2254- llvm_unreachable (" Unhandled PlatformAgnosticAvailabilityKind in switch." );
2247+ llvm_unreachable (" Unhandled AvailableAttr::Kind in switch." );
22552248}
22562249
22572250bool AvailableAttr::isUnconditionallyDeprecated () const {
2258- switch (getPlatformAgnosticAvailability ()) {
2259- case PlatformAgnosticAvailabilityKind::None:
2260- case PlatformAgnosticAvailabilityKind::Unavailable:
2261- case PlatformAgnosticAvailabilityKind::UnavailableInSwift:
2262- case PlatformAgnosticAvailabilityKind::SwiftVersionSpecific:
2263- case PlatformAgnosticAvailabilityKind::PackageDescriptionVersionSpecific:
2264- case PlatformAgnosticAvailabilityKind::NoAsync:
2251+ switch (getKind ()) {
2252+ case Kind::Default:
2253+ case Kind::Unavailable:
2254+ case Kind::NoAsync:
22652255 return false ;
2266-
2267- case PlatformAgnosticAvailabilityKind::Deprecated:
2256+ case Kind::Deprecated:
22682257 return true ;
22692258 }
22702259
2271- llvm_unreachable (" Unhandled PlatformAgnosticAvailabilityKind in switch." );
2260+ llvm_unreachable (" Unhandled AvailableAttr::Kind in switch." );
22722261}
22732262
22742263bool AvailableAttr::isNoAsync () const {
2275- return getPlatformAgnosticAvailability () ==
2276- PlatformAgnosticAvailabilityKind::NoAsync;
2264+ switch (getKind ()) {
2265+ case Kind::Default:
2266+ case Kind::Deprecated:
2267+ case Kind::Unavailable:
2268+ return false ;
2269+ case Kind::NoAsync:
2270+ return true ;
2271+ }
2272+
2273+ llvm_unreachable (" Unhandled AvailableAttr::Kind in switch." );
22772274}
22782275
22792276llvm::VersionTuple
0 commit comments