@@ -147,9 +147,12 @@ class DeclAttribute : public AttributeBase {
147147 Value : 32
148148 );
149149
150- SWIFT_INLINE_BITFIELD (AvailableAttr, DeclAttribute, 1 ,
150+ SWIFT_INLINE_BITFIELD (AvailableAttr, DeclAttribute, 1 + 1 ,
151151 // / Whether this attribute was spelled `@_spi_available`.
152- IsSPI : 1
152+ IsSPI : 1 ,
153+
154+ // / Whether this attribute was spelled `@_unavailableInEmbedded`.
155+ IsForEmbedded : 1
153156 );
154157
155158 SWIFT_INLINE_BITFIELD (ClangImporterSynthesizedTypeAttr, DeclAttribute, 1 ,
@@ -679,8 +682,6 @@ enum class PlatformAgnosticAvailabilityKind {
679682// / Defines the @available attribute.
680683class AvailableAttr : public DeclAttribute {
681684public:
682- #define INIT_VER_TUPLE (X ) X(X.empty() ? std::optional<llvm::VersionTuple>() : X)
683-
684685 AvailableAttr (SourceLoc AtLoc, SourceRange Range, PlatformKind Platform,
685686 StringRef Message, StringRef Rename, ValueDecl *RenameDecl,
686687 const llvm::VersionTuple &Introduced,
@@ -689,17 +690,7 @@ class AvailableAttr : public DeclAttribute {
689690 SourceRange DeprecatedRange,
690691 const llvm::VersionTuple &Obsoleted, SourceRange ObsoletedRange,
691692 PlatformAgnosticAvailabilityKind PlatformAgnostic,
692- bool Implicit, bool IsSPI)
693- : DeclAttribute(DeclAttrKind::Available, AtLoc, Range, Implicit),
694- Message (Message), Rename(Rename), RenameDecl(RenameDecl),
695- INIT_VER_TUPLE(Introduced), IntroducedRange(IntroducedRange),
696- INIT_VER_TUPLE(Deprecated), DeprecatedRange(DeprecatedRange),
697- INIT_VER_TUPLE(Obsoleted), ObsoletedRange(ObsoletedRange),
698- PlatformAgnostic(PlatformAgnostic), Platform(Platform) {
699- Bits.AvailableAttr .IsSPI = IsSPI;
700- }
701-
702- #undef INIT_VER_TUPLE
693+ bool Implicit, bool IsSPI, bool IsForEmbedded = false );
703694
704695 // / The optional message.
705696 const StringRef Message;
@@ -760,6 +751,9 @@ class AvailableAttr : public DeclAttribute {
760751 // / Whether this attribute was spelled `@_spi_available`.
761752 bool isSPI () const { return Bits.AvailableAttr .IsSPI ; }
762753
754+ // / Whether this attribute was spelled `@_unavailableInEmbedded`.
755+ bool isForEmbedded () const { return Bits.AvailableAttr .IsForEmbedded ; }
756+
763757 // / Returns the platform-agnostic availability.
764758 PlatformAgnosticAvailabilityKind getPlatformAgnosticAvailability () const {
765759 return PlatformAgnostic;
0 commit comments