@@ -3189,13 +3189,44 @@ class SemanticAvailableAttr final {
31893189 const AvailableAttr *getParsedAttr () const { return attr; }
31903190 const AvailabilityDomain getDomain () const { return domain; }
31913191
3192+ std::optional<llvm::VersionTuple> getIntroduced () const {
3193+ return attr->Introduced ;
3194+ }
3195+
3196+ std::optional<llvm::VersionTuple> getDeprecated () const {
3197+ return attr->Deprecated ;
3198+ }
3199+
3200+ std::optional<llvm::VersionTuple> getObsoleted () const {
3201+ return attr->Obsoleted ;
3202+ }
3203+
3204+ // / Returns the `message:` field of the attribute, or an empty string.
3205+ StringRef getMessage () const { return attr->Message ; }
3206+
3207+ // / Returns the `rename:` field of the attribute, or an empty string.
3208+ StringRef getRename () const { return attr->Rename ; }
3209+
31923210 // / Returns the platform kind that the attribute applies to, or
31933211 // / `PlatformKind::none` if the attribute is not platform specific.
3194- bool isPlatformSpecific () const { return domain .isPlatform (); }
3212+ bool isPlatformSpecific () const { return getDomain () .isPlatform (); }
31953213
31963214 // / Returns the platform kind that the attribute applies to, or
31973215 // / `PlatformKind::none` if the attribute is not platform specific.
3198- PlatformKind getPlatformKind () const { return domain.getPlatformKind (); }
3216+ PlatformKind getPlatform () const { return getDomain ().getPlatformKind (); }
3217+
3218+ // / Whether this is attribute indicates unavailability in all versions.
3219+ bool isUnconditionallyUnavailable () const {
3220+ return attr->isUnconditionallyUnavailable ();
3221+ }
3222+
3223+ // / Whether this is attribute indicates deprecation in all versions.
3224+ bool isUnconditionallyDeprecated () const {
3225+ return attr->isUnconditionallyDeprecated ();
3226+ }
3227+
3228+ // / Whether this is a `noasync` attribute.
3229+ bool isNoAsync () const { return attr->isNoAsync (); }
31993230
32003231 // / Whether this attribute has an introduced, deprecated, or obsoleted
32013232 // / version.
@@ -3205,14 +3236,17 @@ class SemanticAvailableAttr final {
32053236
32063237 // / Whether this is a language mode specific attribute.
32073238 bool isSwiftLanguageModeSpecific () const {
3208- return domain .isSwiftLanguage () && isVersionSpecific ();
3239+ return getDomain () .isSwiftLanguage () && isVersionSpecific ();
32093240 }
32103241
32113242 // / Whether this is a PackageDescription version specific attribute.
32123243 bool isPackageDescriptionVersionSpecific () const {
3213- return domain .isPackageDescription () && isVersionSpecific ();
3244+ return getDomain () .isPackageDescription () && isVersionSpecific ();
32143245 }
32153246
3247+ // / Whether this attribute was spelled `@_unavailableInEmbedded`.
3248+ bool isEmbeddedSpecific () const { return attr->isForEmbedded (); }
3249+
32163250 // / Returns the active version from the AST context corresponding to
32173251 // / the available kind. For example, this will return the effective language
32183252 // / version for swift version-specific availability kind, PackageDescription
@@ -3228,6 +3262,14 @@ class SemanticAvailableAttr final {
32283262 // / Returns true if this attribute is considered active in the current
32293263 // / compilation context.
32303264 bool isActive (ASTContext &ctx) const ;
3265+
3266+ bool operator ==(const SemanticAvailableAttr &other) const {
3267+ return other.attr == attr;
3268+ }
3269+
3270+ bool operator !=(const SemanticAvailableAttr &other) const {
3271+ return other.attr != attr;
3272+ }
32313273};
32323274
32333275// / An iterable range of `SemanticAvailableAttr`s.
0 commit comments