Skip to content

Commit 8fdc4cc

Browse files
committed
[AST] Split Attr.def to DeclAttr.def and TypeAttr.def
1 parent b839718 commit 8fdc4cc

File tree

22 files changed

+172
-156
lines changed

22 files changed

+172
-156
lines changed

include/swift/AST/ASTBridging.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ namespace swift {
287287
SWIFT_NAME("getter:Bridged" #CLASS "Attr.asDeclAttribute(self:)") \
288288
BridgedDeclAttribute Bridged##CLASS##Attr_asDeclAttribute( \
289289
Bridged##CLASS##Attr attr);
290-
#include "swift/AST/Attr.def"
290+
#include "swift/AST/DeclAttr.def"
291291

292292
struct BridgedPatternBindingEntry {
293293
BridgedPattern pattern;
@@ -423,7 +423,7 @@ BridgedDeclContext BridgedPatternBindingInitializer_asDeclContext(
423423

424424
enum ENUM_EXTENSIBILITY_ATTR(closed) BridgedDeclAttrKind {
425425
#define DECL_ATTR(_, CLASS, ...) BridgedDeclAttrKind##CLASS,
426-
#include "swift/AST/Attr.def"
426+
#include "swift/AST/DelAttr.def"
427427
BridgedDeclAttrKindNone,
428428
};
429429

@@ -1441,7 +1441,7 @@ void BridgedStmt_dump(BridgedStmt statement);
14411441
// Bridged type attribute kinds, which mirror TypeAttrKind exactly.
14421442
enum ENUM_EXTENSIBILITY_ATTR(closed) BridgedTypeAttrKind {
14431443
#define TYPE_ATTR(_, CLASS) BridgedTypeAttrKind##CLASS,
1444-
#include "swift/AST/Attr.def"
1444+
#include "swift/AST/TypeAttr.def"
14451445
BridgedTypeAttrKindNone,
14461446
};
14471447

include/swift/AST/ASTBridgingWrappers.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#define SIMPLE_DECL_ATTR(...)
6565
#define DECL_ATTR(_, Id, ...) AST_BRIDGING_WRAPPER_NONNULL(Id##Attr)
6666
#endif
67-
#include "swift/AST/Attr.def"
67+
#include "swift/AST/DeclAttr.def"
6868

6969
// Some of the base classes need to be nullable to allow them to be used as
7070
// optional parameters.

include/swift/AST/ASTVisitor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class ASTVisitor {
141141
case DeclAttrKind::CLASS: \
142142
return static_cast<ImplClass *>(this)->visit##CLASS##Attr( \
143143
static_cast<CLASS##Attr *>(A), ::std::forward<Args>(AA)...);
144-
#include "swift/AST/Attr.def"
144+
#include "swift/AST/DeclAttr.def"
145145

146146
case DeclAttrKind::Count:
147147
llvm_unreachable("Not an attribute kind");
@@ -153,7 +153,7 @@ class ASTVisitor {
153153
return static_cast<ImplClass*>(this)->visitDeclAttribute( \
154154
A, ::std::forward<Args>(AA)...); \
155155
}
156-
#include "swift/AST/Attr.def"
156+
#include "swift/AST/DeclAttr.def"
157157

158158
bool visit(ParameterList *PL) {
159159
return static_cast<ImplClass*>(this)->visitParameterList(PL);

include/swift/AST/Attr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ class DeclAttribute : public AttributeBase {
419419
static constexpr bool isOptionSetFor##CLASS(DeclAttrOptions Bit) { \
420420
return (OPTIONS) & Bit; \
421421
}
422-
#include "swift/AST/Attr.def"
422+
#include "swift/AST/DeclAttr.def"
423423

424424
static bool isAddingBreakingAPI(DeclAttrKind DK) {
425425
return getOptions(DK) & APIBreakingToAdd;
@@ -503,7 +503,7 @@ class SimpleDeclAttr : public DeclAttribute {
503503
// Declare typedefs for all of the simple declaration attributes.
504504
#define SIMPLE_DECL_ATTR(_, CLASS, ...) \
505505
typedef SimpleDeclAttr<DeclAttrKind::CLASS> CLASS##Attr;
506-
#include "swift/AST/Attr.def"
506+
#include "swift/AST/DeclAttr.def"
507507

508508
/// Defines the @_silgen_name attribute.
509509
class SILGenNameAttr : public DeclAttribute {
@@ -3040,7 +3040,7 @@ using SimpleTypeAttrWithArgs = SimpleTypeAttr<Kind, AtTypeAttrWithArgsBase>;
30403040

30413041
#define SIMPLE_TYPE_ATTR(SPELLING, CLASS) \
30423042
using CLASS##TypeAttr = SimpleTypeAttr<TypeAttrKind::CLASS>;
3043-
#include "swift/AST/Attr.def"
3043+
#include "swift/AST/TypeAttr.def"
30443044

30453045
class ConventionTypeAttr
30463046
: public SimpleTypeAttrWithArgs<TypeAttrKind::Convention> {

include/swift/AST/AttrKind.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ enum : unsigned { NumExternKindBits =
132132

133133
enum class DeclAttrKind : unsigned {
134134
#define DECL_ATTR(_, CLASS, ...) CLASS,
135-
#include "swift/AST/Attr.def"
135+
#include "swift/AST/DeclAttr.def"
136136
Count
137137
};
138138

@@ -144,12 +144,12 @@ enum : unsigned {
144144
// Define enumerators for each type attribute, e.g. TypeAttrKind::Weak.
145145
enum class TypeAttrKind {
146146
#define TYPE_ATTR(_, CLASS) CLASS,
147-
#include "swift/AST/Attr.def"
147+
#include "swift/AST/TypeAttr.def"
148148
};
149149

150150
enum : unsigned {
151151
#define TYPE_ATTR(_, C) _counting_TAK_##C,
152-
#include "swift/AST/Attr.def"
152+
#include "swift/AST/TypeAttr.def"
153153
NumTypeAttrKinds,
154154

155155
NumTypeAttrKindBits = countBitsUsed(NumTypeAttrKinds - 1)

include/swift/AST/Attr.def renamed to include/swift/AST/DeclAttr.def

Lines changed: 3 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
//===--- Attr.def - Swift Attributes Metaprogramming ------------*- C++ -*-===//
1+
//===--- DeclAttr.def - Swift Attributes Metaprogramming - ------*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
1212
//
13-
// This file defines macros used for macro-metaprogramming with attributes.
13+
// This file defines macros used for macro-metaprogramming with decl attributes.
1414
//
1515
//===----------------------------------------------------------------------===//
1616

@@ -42,97 +42,6 @@
4242
DECL_ATTR_ALIAS(SPELLING, CLASS)
4343
#endif
4444

45-
// A type attribute that is both a simple type attribute and a
46-
// SIL type attribute (see below). Delegates to SIL_TYPE_ATTR if that
47-
// is set and SIMPLE_TYPE_ATTR is not; otherwise delegates to SIMPLE_TYPE_ATTR.
48-
#ifndef SIMPLE_SIL_TYPE_ATTR
49-
#ifdef SIL_TYPE_ATTR
50-
#ifdef SIMPLE_TYPE_ATTR
51-
#error ambiguous delegation, must set SIMPLE_SIL_TYPE_ATTR explicitly
52-
#else
53-
#define SIMPLE_SIL_TYPE_ATTR(SPELLING, CLASS) SIL_TYPE_ATTR(SPELLING, CLASS)
54-
#endif
55-
#else
56-
#define SIMPLE_SIL_TYPE_ATTR(SPELLING, CLASS) SIMPLE_TYPE_ATTR(SPELLING, CLASS)
57-
#endif
58-
#endif
59-
60-
// Any kind of type attribute.
61-
#ifndef TYPE_ATTR
62-
#define TYPE_ATTR(SPELLING, CLASS)
63-
#endif
64-
65-
// A type attribute that is only valid in SIL mode. Usually this means
66-
// that it's only valid in lowered types, but sometimes SIL files
67-
// also allow things in formal types that aren't normally expressible.
68-
#ifndef SIL_TYPE_ATTR
69-
#define SIL_TYPE_ATTR(SPELLING, CLASS) TYPE_ATTR(SPELLING, CLASS)
70-
#endif
71-
72-
// A type attribute that's always just spelled `@identifier` in source.
73-
#ifndef SIMPLE_TYPE_ATTR
74-
#define SIMPLE_TYPE_ATTR(SPELLING, CLASS) TYPE_ATTR(SPELLING, CLASS)
75-
#endif
76-
77-
78-
// Type attributes
79-
SIMPLE_TYPE_ATTR(autoclosure, Autoclosure)
80-
TYPE_ATTR(convention, Convention)
81-
SIMPLE_TYPE_ATTR(noescape, NoEscape)
82-
SIMPLE_TYPE_ATTR(escaping, Escaping)
83-
TYPE_ATTR(differentiable, Differentiable)
84-
SIMPLE_TYPE_ATTR(noDerivative, NoDerivative)
85-
SIMPLE_TYPE_ATTR(async, Async)
86-
SIMPLE_TYPE_ATTR(Sendable, Sendable)
87-
SIMPLE_TYPE_ATTR(retroactive, Retroactive)
88-
SIMPLE_TYPE_ATTR(unchecked, Unchecked)
89-
SIMPLE_TYPE_ATTR(preconcurrency, Preconcurrency)
90-
SIMPLE_TYPE_ATTR(_local, Local)
91-
SIMPLE_TYPE_ATTR(_noMetadata, NoMetadata)
92-
TYPE_ATTR(_opaqueReturnTypeOf, OpaqueReturnTypeOf)
93-
94-
// SIL-specific attributes
95-
SIMPLE_SIL_TYPE_ATTR(block_storage, BlockStorage)
96-
SIMPLE_SIL_TYPE_ATTR(box, Box)
97-
SIMPLE_SIL_TYPE_ATTR(dynamic_self, DynamicSelf)
98-
#define REF_STORAGE(Name, name, ...) SIMPLE_TYPE_ATTR(sil_##name, SIL##Name)
99-
#include "swift/AST/ReferenceStorage.def"
100-
SIMPLE_SIL_TYPE_ATTR(error, Error)
101-
SIMPLE_SIL_TYPE_ATTR(error_indirect, ErrorIndirect)
102-
SIMPLE_SIL_TYPE_ATTR(error_unowned, ErrorUnowned)
103-
SIMPLE_SIL_TYPE_ATTR(out, Out)
104-
SIMPLE_SIL_TYPE_ATTR(direct, Direct)
105-
SIMPLE_SIL_TYPE_ATTR(in, In)
106-
SIMPLE_SIL_TYPE_ATTR(inout, Inout)
107-
SIMPLE_SIL_TYPE_ATTR(inout_aliasable, InoutAliasable)
108-
SIMPLE_SIL_TYPE_ATTR(in_guaranteed, InGuaranteed)
109-
SIMPLE_SIL_TYPE_ATTR(in_constant, InConstant)
110-
SIMPLE_SIL_TYPE_ATTR(pack_owned, PackOwned)
111-
SIMPLE_SIL_TYPE_ATTR(pack_guaranteed, PackGuaranteed)
112-
SIMPLE_SIL_TYPE_ATTR(pack_inout, PackInout)
113-
SIMPLE_SIL_TYPE_ATTR(pack_out, PackOut)
114-
SIMPLE_SIL_TYPE_ATTR(owned, Owned)
115-
SIMPLE_SIL_TYPE_ATTR(unowned_inner_pointer, UnownedInnerPointer)
116-
SIMPLE_SIL_TYPE_ATTR(guaranteed, Guaranteed)
117-
SIMPLE_SIL_TYPE_ATTR(autoreleased, Autoreleased)
118-
SIMPLE_SIL_TYPE_ATTR(callee_owned, CalleeOwned)
119-
SIMPLE_SIL_TYPE_ATTR(callee_guaranteed, CalleeGuaranteed)
120-
SIMPLE_SIL_TYPE_ATTR(objc_metatype, ObjCMetatype)
121-
SIL_TYPE_ATTR(opened, Opened)
122-
SIL_TYPE_ATTR(pack_element, PackElement)
123-
SIMPLE_SIL_TYPE_ATTR(pseudogeneric, Pseudogeneric)
124-
SIMPLE_SIL_TYPE_ATTR(unimplementable, Unimplementable)
125-
SIMPLE_SIL_TYPE_ATTR(yields, Yields)
126-
SIMPLE_SIL_TYPE_ATTR(yield_once, YieldOnce)
127-
SIMPLE_SIL_TYPE_ATTR(yield_many, YieldMany)
128-
SIMPLE_SIL_TYPE_ATTR(captures_generics, CapturesGenerics)
129-
// Used at the SIL level to mark a type as moveOnly.
130-
SIMPLE_SIL_TYPE_ATTR(moveOnly, MoveOnly)
131-
SIMPLE_SIL_TYPE_ATTR(isolated, Isolated)
132-
133-
// SIL metatype attributes.
134-
SIMPLE_SIL_TYPE_ATTR(thin, Thin)
135-
SIMPLE_SIL_TYPE_ATTR(thick, Thick)
13645

13746
// Declaration Attributes and Modifers
13847
DECL_ATTR(_silgen_name, SILGenName,
@@ -574,10 +483,6 @@ SIMPLE_DECL_ATTR(_noObjCBridging, NoObjCBridging,
574483
OnAbstractFunction | OnSubscript | UserInaccessible | ABIStableToAdd | ABIStableToRemove | APIStableToAdd | APIStableToRemove,
575484
155)
576485

577-
#undef SIMPLE_SIL_TYPE_ATTR
578-
#undef SIMPLE_TYPE_ATTR
579-
#undef SIL_TYPE_ATTR
580-
#undef TYPE_ATTR
581486
#undef DECL_ATTR_ALIAS
582487
#undef CONTEXTUAL_DECL_ATTR_ALIAS
583488
#undef SIMPLE_DECL_ATTR

include/swift/AST/TypeAttr.def

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
//===--- TypeAttr.def - Swift Attributes Metaprogramming --------*- C++ -*-===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
//
13+
// This file defines macros used for macro-metaprogramming with type attributes.
14+
//
15+
//===----------------------------------------------------------------------===//
16+
17+
// A type attribute that is both a simple type attribute and a
18+
// SIL type attribute (see below). Delegates to SIL_TYPE_ATTR if that
19+
// is set and SIMPLE_TYPE_ATTR is not; otherwise delegates to SIMPLE_TYPE_ATTR.
20+
#ifndef SIMPLE_SIL_TYPE_ATTR
21+
#ifdef SIL_TYPE_ATTR
22+
#ifdef SIMPLE_TYPE_ATTR
23+
#error ambiguous delegation, must set SIMPLE_SIL_TYPE_ATTR explicitly
24+
#else
25+
#define SIMPLE_SIL_TYPE_ATTR(SPELLING, CLASS) SIL_TYPE_ATTR(SPELLING, CLASS)
26+
#endif
27+
#else
28+
#define SIMPLE_SIL_TYPE_ATTR(SPELLING, CLASS) SIMPLE_TYPE_ATTR(SPELLING, CLASS)
29+
#endif
30+
#endif
31+
32+
// Any kind of type attribute.
33+
#ifndef TYPE_ATTR
34+
#define TYPE_ATTR(SPELLING, CLASS)
35+
#endif
36+
37+
// A type attribute that is only valid in SIL mode. Usually this means
38+
// that it's only valid in lowered types, but sometimes SIL files
39+
// also allow things in formal types that aren't normally expressible.
40+
#ifndef SIL_TYPE_ATTR
41+
#define SIL_TYPE_ATTR(SPELLING, CLASS) TYPE_ATTR(SPELLING, CLASS)
42+
#endif
43+
44+
// A type attribute that's always just spelled `@identifier` in source.
45+
#ifndef SIMPLE_TYPE_ATTR
46+
#define SIMPLE_TYPE_ATTR(SPELLING, CLASS) TYPE_ATTR(SPELLING, CLASS)
47+
#endif
48+
49+
// Type attributes
50+
SIMPLE_TYPE_ATTR(autoclosure, Autoclosure)
51+
TYPE_ATTR(convention, Convention)
52+
SIMPLE_TYPE_ATTR(noescape, NoEscape)
53+
SIMPLE_TYPE_ATTR(escaping, Escaping)
54+
TYPE_ATTR(differentiable, Differentiable)
55+
SIMPLE_TYPE_ATTR(noDerivative, NoDerivative)
56+
SIMPLE_TYPE_ATTR(async, Async)
57+
SIMPLE_TYPE_ATTR(Sendable, Sendable)
58+
SIMPLE_TYPE_ATTR(retroactive, Retroactive)
59+
SIMPLE_TYPE_ATTR(unchecked, Unchecked)
60+
SIMPLE_TYPE_ATTR(preconcurrency, Preconcurrency)
61+
SIMPLE_TYPE_ATTR(_local, Local)
62+
SIMPLE_TYPE_ATTR(_noMetadata, NoMetadata)
63+
TYPE_ATTR(_opaqueReturnTypeOf, OpaqueReturnTypeOf)
64+
65+
// SIL-specific attributes
66+
SIMPLE_SIL_TYPE_ATTR(block_storage, BlockStorage)
67+
SIMPLE_SIL_TYPE_ATTR(box, Box)
68+
SIMPLE_SIL_TYPE_ATTR(dynamic_self, DynamicSelf)
69+
#define REF_STORAGE(Name, name, ...) SIMPLE_TYPE_ATTR(sil_##name, SIL##Name)
70+
#include "swift/AST/ReferenceStorage.def"
71+
SIMPLE_SIL_TYPE_ATTR(error, Error)
72+
SIMPLE_SIL_TYPE_ATTR(error_indirect, ErrorIndirect)
73+
SIMPLE_SIL_TYPE_ATTR(error_unowned, ErrorUnowned)
74+
SIMPLE_SIL_TYPE_ATTR(out, Out)
75+
SIMPLE_SIL_TYPE_ATTR(direct, Direct)
76+
SIMPLE_SIL_TYPE_ATTR(in, In)
77+
SIMPLE_SIL_TYPE_ATTR(inout, Inout)
78+
SIMPLE_SIL_TYPE_ATTR(inout_aliasable, InoutAliasable)
79+
SIMPLE_SIL_TYPE_ATTR(in_guaranteed, InGuaranteed)
80+
SIMPLE_SIL_TYPE_ATTR(in_constant, InConstant)
81+
SIMPLE_SIL_TYPE_ATTR(pack_owned, PackOwned)
82+
SIMPLE_SIL_TYPE_ATTR(pack_guaranteed, PackGuaranteed)
83+
SIMPLE_SIL_TYPE_ATTR(pack_inout, PackInout)
84+
SIMPLE_SIL_TYPE_ATTR(pack_out, PackOut)
85+
SIMPLE_SIL_TYPE_ATTR(owned, Owned)
86+
SIMPLE_SIL_TYPE_ATTR(unowned_inner_pointer, UnownedInnerPointer)
87+
SIMPLE_SIL_TYPE_ATTR(guaranteed, Guaranteed)
88+
SIMPLE_SIL_TYPE_ATTR(autoreleased, Autoreleased)
89+
SIMPLE_SIL_TYPE_ATTR(callee_owned, CalleeOwned)
90+
SIMPLE_SIL_TYPE_ATTR(callee_guaranteed, CalleeGuaranteed)
91+
SIMPLE_SIL_TYPE_ATTR(objc_metatype, ObjCMetatype)
92+
SIL_TYPE_ATTR(opened, Opened)
93+
SIL_TYPE_ATTR(pack_element, PackElement)
94+
SIMPLE_SIL_TYPE_ATTR(pseudogeneric, Pseudogeneric)
95+
SIMPLE_SIL_TYPE_ATTR(unimplementable, Unimplementable)
96+
SIMPLE_SIL_TYPE_ATTR(yields, Yields)
97+
SIMPLE_SIL_TYPE_ATTR(yield_once, YieldOnce)
98+
SIMPLE_SIL_TYPE_ATTR(yield_many, YieldMany)
99+
SIMPLE_SIL_TYPE_ATTR(captures_generics, CapturesGenerics)
100+
// Used at the SIL level to mark a type as moveOnly.
101+
SIMPLE_SIL_TYPE_ATTR(moveOnly, MoveOnly)
102+
SIMPLE_SIL_TYPE_ATTR(isolated, Isolated)
103+
104+
// SIL metatype attributes.
105+
SIMPLE_SIL_TYPE_ATTR(thin, Thin)
106+
SIMPLE_SIL_TYPE_ATTR(thick, Thick)
107+
108+
#undef SIMPLE_SIL_TYPE_ATTR
109+
#undef SIMPLE_TYPE_ATTR
110+
#undef SIL_TYPE_ATTR
111+
#undef TYPE_ATTR

include/swift/Parse/Token.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class Token {
190190
#define CONTEXTUAL_DECL_ATTR(KW, ...) CONTEXTUAL_CASE(KW)
191191
#define CONTEXTUAL_DECL_ATTR_ALIAS(KW, ...) CONTEXTUAL_CASE(KW)
192192
#define CONTEXTUAL_SIMPLE_DECL_ATTR(KW, ...) CONTEXTUAL_CASE(KW)
193-
#include "swift/AST/Attr.def"
193+
#include "swift/AST/DeclAttr.def"
194194
#undef CONTEXTUAL_CASE
195195
.Case("macro", true)
196196
.Default(false);

lib/APIDigester/ModuleAnalyzerNodes.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ SDKNode* SDKNode::constructSDKNode(SDKContext &Ctx,
711711
auto Result = llvm::StringSwitch<llvm::Optional<TypeAttrKind>>(
712712
GetScalarString(&N))
713713
#define TYPE_ATTR(X, C) .Case(#X, TypeAttrKind::C)
714-
#include "swift/AST/Attr.def"
714+
#include "swift/AST/TypeAttr.def"
715715
.Default(llvm::None);
716716

717717
if (!Result)
@@ -730,7 +730,7 @@ SDKNode* SDKNode::constructSDKNode(SDKContext &Ctx,
730730
auto Result =
731731
llvm::StringSwitch<DeclAttrKind>(GetScalarString(&N))
732732
#define DECL_ATTR(_, NAME, ...) .Case(#NAME, DeclAttrKind::NAME)
733-
#include "swift/AST/Attr.def"
733+
#include "swift/AST/DeclAttr.def"
734734
.Default(DeclAttrKind::Count);
735735
if (Result == DeclAttrKind::Count)
736736
Ctx.diagnose(&N, diag::sdk_node_unrecognized_decl_attr_kind,
@@ -2231,7 +2231,7 @@ struct ScalarEnumerationTraits<TypeAttrKind> {
22312231
// NOTE: For historical reasons. TypeAttribute uses the spelling, but
22322232
// DeclAttribute uses the kind name.
22332233
#define TYPE_ATTR(X, C) out.enumCase(value, #X, TypeAttrKind::C);
2234-
#include "swift/AST/Attr.def"
2234+
#include "swift/AST/TypeAttr.def"
22352235
}
22362236
};
22372237

@@ -2241,7 +2241,7 @@ struct ScalarEnumerationTraits<DeclAttrKind> {
22412241
// NOTE: For historical reasons. TypeAttribute uses the spelling, but
22422242
// DeclAttribute uses the kind name.
22432243
#define DECL_ATTR(_, Name, ...) out.enumCase(value, #Name, DeclAttrKind::Name);
2244-
#include "swift/AST/Attr.def"
2244+
#include "swift/AST/DeclAttr.def"
22452245
}
22462246
};
22472247

@@ -2780,7 +2780,7 @@ static StringRef getAttrName(DeclAttrKind Kind) {
27802780
case DeclAttrKind::CLASS: \
27812781
return DeclAttribute::isDeclModifier(DeclAttrKind::CLASS) ? #NAME \
27822782
: "@" #NAME;
2783-
#include "swift/AST/Attr.def"
2783+
#include "swift/AST/DeclAttr.def"
27842784
case DeclAttrKind::Count:
27852785
llvm_unreachable("unrecognized attribute kind.");
27862786
}

0 commit comments

Comments
 (0)