summaryrefslogtreecommitdiffstats
path: root/clang/utils/TableGen/TableGen.cpp
diff options
context:
space:
mode:
authorDeLesley Hutchins <delesley@google.com>2013-12-30 17:24:36 +0000
committerDeLesley Hutchins <delesley@google.com>2013-12-30 17:24:36 +0000
commitc4a82438a7c530aaa3d94e5942355b788de525a2 (patch)
treeae872cff327bd3f9135d9970b4483a65f983bdb7 /clang/utils/TableGen/TableGen.cpp
parentd86672037b3a0b030ce00bf1badff59d380f0a51 (diff)
downloadbcm5719-llvm-c4a82438a7c530aaa3d94e5942355b788de525a2.tar.gz
bcm5719-llvm-c4a82438a7c530aaa3d94e5942355b788de525a2.zip
Update RecursiveASTVisitor so that it visits attributes. This is currently
important for thread safety attributes, which contain expressions that were not being visited, and were thus invisible to various tools. There are now Visit*Attr methods that can be overridden for every attribute. llvm-svn: 198224
Diffstat (limited to 'clang/utils/TableGen/TableGen.cpp')
-rw-r--r--clang/utils/TableGen/TableGen.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/utils/TableGen/TableGen.cpp b/clang/utils/TableGen/TableGen.cpp
index 0e45d81d1af..e0cd027e736 100644
--- a/clang/utils/TableGen/TableGen.cpp
+++ b/clang/utils/TableGen/TableGen.cpp
@@ -32,6 +32,7 @@ enum ActionType {
GenClangAttrPCHWrite,
GenClangAttrSpellingList,
GenClangAttrSpellingListIndex,
+ GenClangAttrASTVisitor,
GenClangAttrLateParsedList,
GenClangAttrTemplateInstantiate,
GenClangAttrParsedAttrList,
@@ -82,6 +83,9 @@ cl::opt<ActionType> Action(
clEnumValN(GenClangAttrSpellingListIndex,
"gen-clang-attr-spelling-index",
"Generate a clang attribute spelling index"),
+ clEnumValN(GenClangAttrASTVisitor,
+ "gen-clang-attr-ast-visitor",
+ "Generate a recursive AST visitor for clang attributes"),
clEnumValN(GenClangAttrLateParsedList,
"gen-clang-attr-late-parsed-list",
"Generate a clang attribute LateParsed list"),
@@ -171,6 +175,9 @@ bool ClangTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
case GenClangAttrSpellingListIndex:
EmitClangAttrSpellingListIndex(Records, OS);
break;
+ case GenClangAttrASTVisitor:
+ EmitClangAttrASTVisitor(Records, OS);
+ break;
case GenClangAttrLateParsedList:
EmitClangAttrLateParsedList(Records, OS);
break;
OpenPOWER on IntegriCloud