swift-api-digester: diagnose removal/addition of dynamic attribute under abi mode.

This commit is contained in:
Xi Ge
2018-08-16 16:50:05 -07:00
parent 2152d0bde0
commit bc79f3011a
5 changed files with 14 additions and 3 deletions

View File

@@ -273,7 +273,9 @@ class SDKContext {
static StringRef getAttrName(DeclAttrKind Kind) {
switch (Kind) {
#define DECL_ATTR(NAME, CLASS, ...) case DAK_##CLASS: return "@"#NAME;
#define DECL_ATTR(NAME, CLASS, ...) \
case DAK_##CLASS: \
return DeclAttribute::isDeclModifier(DAK_##CLASS) ? #NAME : "@"#NAME;
#include "swift/AST/Attr.def"
case DAK_Count:
llvm_unreachable("unrecognized attribute kind.");
@@ -287,6 +289,7 @@ public:
ADD(ObjC)
ADD(FixedLayout)
ADD(Frozen)
ADD(Dynamic)
#undef ADD
}
llvm::BumpPtrAllocator &allocator() {