@@ -364,6 +364,41 @@ class DeclAttribute : public AttributeBase {
364
364
365
365
// / The opposite of ABIBreakingToRemove
366
366
ABIStableToRemove = 1ull << 15 ,
367
+
368
+ // / Attribute should not be used in an \c \@abi attribute. Use for
369
+ // / attributes which cannot affect mangled names, even indirectly, and
370
+ // / which either don't affect ABI or where ABI-only declarations get their
371
+ // / behavior from their API counterpart.
372
+ ForbiddenInABIAttr = 1ull << 16 ,
373
+
374
+ // / Attribute can be used without restrictions in an \c \@abi attribute.
375
+ // / Use for attributes which affect mangled names but otherwise don't alter
376
+ // / the ABI, or ones where the \c ABIDeclChecker manually implements
377
+ // / special checking logic (e.g. because several different attributes
378
+ // / contribute to the same aspect of ABI in some complicated way).
379
+ UnconstrainedInABIAttr = 1ull << 17 ,
380
+
381
+ // / Attribute can be used in an \c \@abi attribute, but must match
382
+ // / equivalent on API decl. Use for attributes which affect both mangled
383
+ // / names and other parts of the ABI such that the declaration can only be
384
+ // / valid if they match.
385
+ EquivalentInABIAttr = 1ull << 18 ,
386
+
387
+ // / Attribute can be used in an \c \@abi attribute, but must match
388
+ // / equivalent on API decl; if omitted, API decl's attribute will be
389
+ // / cloned. Use where you would want to use \c EquivalentInABIAttr but
390
+ // / repeating the attribute is judged too burdensome.
391
+ InferredInABIAttr = 1ull << 19 ,
392
+
393
+ // / Use for attributes which are \em only valid on declarations that cannot
394
+ // / have an \c @abi attribute, such as \c ImportDecl .
395
+ UnreachableInABIAttr = 1ull << 20 ,
396
+ };
397
+
398
+ enum : uint64_t {
399
+ InABIAttrMask = ForbiddenInABIAttr | UnconstrainedInABIAttr
400
+ | EquivalentInABIAttr | InferredInABIAttr
401
+ | UnreachableInABIAttr
367
402
};
368
403
369
404
LLVM_READNONE
0 commit comments