diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-29 01:24:26 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-29 01:24:26 +0000 |
commit | 5cd532ca0bc1cb8110e24586d064f72332d8b767 (patch) | |
tree | fda31159ec2c469b75d54fca5e6c98a0a96733e4 /utils | |
parent | a438b2d277fae00a4fa467ffcf382246e0a201e9 (diff) |
Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelled
as a keyword. Rationalize existing attributes to use it as appropriate, and to
not lie about some __declspec attributes being GNU attributes. In passing,
remove a gross hack which was discarding attributes which we could handle. This
results in us actually respecting the __pascal keyword again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/ClangAttrEmitter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index 09f4e19081..d936e260b8 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -776,8 +776,11 @@ static void writePrettyPrintFunction(Record &R, std::vector<Argument*> &Args, } else if (Variety == "Declspec") { Prefix = " __declspec("; Suffix = ")"; + } else if (Variety == "Keyword") { + Prefix = " "; + Suffix = ""; } else { - llvm_unreachable("Unkown attribute syntax variety!"); + llvm_unreachable("Unknown attribute syntax variety!"); } Spelling += Name; @@ -1149,6 +1152,7 @@ void EmitClangAttrSpellingListIndex(RecordKeeper &Records, raw_ostream &OS) { .Case("GNU", 0) .Case("CXX11", 1) .Case("Declspec", 2) + .Case("Keyword", 3) .Default(0) << " && Scope == \"" << Namespace << "\")\n" << " return " << I << ";\n"; |