summaryrefslogtreecommitdiffstats
path: root/clang/utils/TableGen/TableGen.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-31 13:14:44 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-31 13:14:44 +0000
commit2fbf99429a156523fa9bdee917a3a19d57ef7b8e (patch)
tree5722f190e46201a403181342ea9e6bb4aac227fc /clang/utils/TableGen/TableGen.cpp
parent8aa19c1392d681712a3e556ea4206279d29f49e9 (diff)
downloadbcm5719-llvm-2fbf99429a156523fa9bdee917a3a19d57ef7b8e.tar.gz
bcm5719-llvm-2fbf99429a156523fa9bdee917a3a19d57ef7b8e.zip
Reapplying r204952 a second time.
Clean up the __has_attribute implementation without modifying its behavior. Replaces the tablegen-driven AttrSpellings.inc, which lived in the lexing layer with AttrHasAttributeImpl.inc, which lives in the basic layer. Updates the preprocessor to call through to this new functionality which can take additional information into account (such as scopes and syntaxes). Expose the ability for parts of the compiler to ask whether an attribute is supported for a given spelling (including scope), syntax, triple and language options. llvm-svn: 205181
Diffstat (limited to 'clang/utils/TableGen/TableGen.cpp')
-rw-r--r--clang/utils/TableGen/TableGen.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/utils/TableGen/TableGen.cpp b/clang/utils/TableGen/TableGen.cpp
index 6737f777498..4484e65097c 100644
--- a/clang/utils/TableGen/TableGen.cpp
+++ b/clang/utils/TableGen/TableGen.cpp
@@ -29,7 +29,7 @@ enum ActionType {
GenClangAttrList,
GenClangAttrPCHRead,
GenClangAttrPCHWrite,
- GenClangAttrSpellingList,
+ GenClangAttrHasAttributeImpl,
GenClangAttrSpellingListIndex,
GenClangAttrASTVisitor,
GenClangAttrTemplateInstantiate,
@@ -72,7 +72,8 @@ cl::opt<ActionType> Action(
"Generate clang PCH attribute reader"),
clEnumValN(GenClangAttrPCHWrite, "gen-clang-attr-pch-write",
"Generate clang PCH attribute writer"),
- clEnumValN(GenClangAttrSpellingList, "gen-clang-attr-spelling-list",
+ clEnumValN(GenClangAttrHasAttributeImpl,
+ "gen-clang-attr-has-attribute-impl",
"Generate a clang attribute spelling list"),
clEnumValN(GenClangAttrSpellingListIndex,
"gen-clang-attr-spelling-index",
@@ -159,8 +160,8 @@ bool ClangTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
case GenClangAttrPCHWrite:
EmitClangAttrPCHWrite(Records, OS);
break;
- case GenClangAttrSpellingList:
- EmitClangAttrSpellingList(Records, OS);
+ case GenClangAttrHasAttributeImpl:
+ EmitClangAttrHasAttrImpl(Records, OS);
break;
case GenClangAttrSpellingListIndex:
EmitClangAttrSpellingListIndex(Records, OS);
OpenPOWER on IntegriCloud