|
10 | 10 | #define LLVM_CLANG_APINOTES_TYPES_H |
11 | 11 |
|
12 | 12 | #include "clang/Basic/Specifiers.h" |
| 13 | +#include "clang/Support/Compiler.h" |
13 | 14 | #include "llvm/ADT/ArrayRef.h" |
14 | 15 | #include "llvm/ADT/StringRef.h" |
15 | 16 | #include <climits> |
@@ -49,7 +50,7 @@ enum class SwiftNewTypeKind { |
49 | 50 | /// Describes API notes data for any entity. |
50 | 51 | /// |
51 | 52 | /// This is used as the base of all API notes. |
52 | | -class CommonEntityInfo { |
| 53 | +class CLANG_ABI CommonEntityInfo { |
53 | 54 | public: |
54 | 55 | /// Message to use when this entity is unavailable. |
55 | 56 | std::string UnavailableMsg; |
@@ -132,7 +133,7 @@ inline bool operator!=(const CommonEntityInfo &LHS, |
132 | 133 | } |
133 | 134 |
|
134 | 135 | /// Describes API notes for types. |
135 | | -class CommonTypeInfo : public CommonEntityInfo { |
| 136 | +class CLANG_ABI CommonTypeInfo : public CommonEntityInfo { |
136 | 137 | /// The Swift type to which a given type is bridged. |
137 | 138 | /// |
138 | 139 | /// Reflects the swift_bridge attribute. |
@@ -194,7 +195,7 @@ inline bool operator!=(const CommonTypeInfo &LHS, const CommonTypeInfo &RHS) { |
194 | 195 |
|
195 | 196 | /// Describes API notes data for an Objective-C class or protocol or a C++ |
196 | 197 | /// namespace. |
197 | | -class ContextInfo : public CommonTypeInfo { |
| 198 | +class CLANG_ABI ContextInfo : public CommonTypeInfo { |
198 | 199 | /// Whether this class has a default nullability. |
199 | 200 | LLVM_PREFERRED_TYPE(bool) |
200 | 201 | unsigned HasDefaultNullability : 1; |
@@ -301,7 +302,7 @@ inline bool operator!=(const ContextInfo &LHS, const ContextInfo &RHS) { |
301 | 302 | } |
302 | 303 |
|
303 | 304 | /// API notes for a variable/property. |
304 | | -class VariableInfo : public CommonEntityInfo { |
| 305 | +class CLANG_ABI VariableInfo : public CommonEntityInfo { |
305 | 306 | /// Whether this property has been audited for nullability. |
306 | 307 | LLVM_PREFERRED_TYPE(bool) |
307 | 308 | unsigned NullabilityAudited : 1; |
@@ -358,7 +359,7 @@ inline bool operator!=(const VariableInfo &LHS, const VariableInfo &RHS) { |
358 | 359 | } |
359 | 360 |
|
360 | 361 | /// Describes API notes data for an Objective-C property. |
361 | | -class ObjCPropertyInfo : public VariableInfo { |
| 362 | +class CLANG_ABI ObjCPropertyInfo : public VariableInfo { |
362 | 363 | LLVM_PREFERRED_TYPE(bool) |
363 | 364 | unsigned SwiftImportAsAccessorsSpecified : 1; |
364 | 365 | LLVM_PREFERRED_TYPE(bool) |
@@ -416,7 +417,7 @@ inline bool operator!=(const ObjCPropertyInfo &LHS, |
416 | 417 | } |
417 | 418 |
|
418 | 419 | /// Describes a function or method parameter. |
419 | | -class ParamInfo : public VariableInfo { |
| 420 | +class CLANG_ABI ParamInfo : public VariableInfo { |
420 | 421 | /// Whether noescape was specified. |
421 | 422 | LLVM_PREFERRED_TYPE(bool) |
422 | 423 | unsigned NoEscapeSpecified : 1; |
@@ -486,7 +487,7 @@ inline bool operator!=(const ParamInfo &LHS, const ParamInfo &RHS) { |
486 | 487 | } |
487 | 488 |
|
488 | 489 | /// API notes for a function or method. |
489 | | -class FunctionInfo : public CommonEntityInfo { |
| 490 | +class CLANG_ABI FunctionInfo : public CommonEntityInfo { |
490 | 491 | private: |
491 | 492 | static constexpr const uint64_t NullabilityKindMask = 0x3; |
492 | 493 | static constexpr const unsigned NullabilityKindSize = 2; |
@@ -606,7 +607,7 @@ inline bool operator!=(const FunctionInfo &LHS, const FunctionInfo &RHS) { |
606 | 607 | } |
607 | 608 |
|
608 | 609 | /// Describes API notes data for an Objective-C method. |
609 | | -class ObjCMethodInfo : public FunctionInfo { |
| 610 | +class CLANG_ABI ObjCMethodInfo : public FunctionInfo { |
610 | 611 | public: |
611 | 612 | /// Whether this is a designated initializer of its class. |
612 | 613 | LLVM_PREFERRED_TYPE(bool) |
@@ -675,7 +676,7 @@ class EnumConstantInfo : public CommonEntityInfo { |
675 | 676 | }; |
676 | 677 |
|
677 | 678 | /// Describes API notes data for a tag. |
678 | | -class TagInfo : public CommonTypeInfo { |
| 679 | +class CLANG_ABI TagInfo : public CommonTypeInfo { |
679 | 680 | LLVM_PREFERRED_TYPE(bool) |
680 | 681 | unsigned HasFlagEnum : 1; |
681 | 682 | LLVM_PREFERRED_TYPE(bool) |
@@ -765,7 +766,7 @@ inline bool operator!=(const TagInfo &LHS, const TagInfo &RHS) { |
765 | 766 | } |
766 | 767 |
|
767 | 768 | /// Describes API notes data for a typedef. |
768 | | -class TypedefInfo : public CommonTypeInfo { |
| 769 | +class CLANG_ABI TypedefInfo : public CommonTypeInfo { |
769 | 770 | public: |
770 | 771 | std::optional<SwiftNewTypeKind> SwiftWrapper; |
771 | 772 |
|
|
0 commit comments