Move the enum attributes defined in Attributes.h to a table-gen file.
[oota-llvm.git] / utils / TableGen / TableGen.cpp
index 02fe4dc98bea67a7683be81a86b8c3c19b60bbca..c16a5583eb36552234d9f2b9afd4ae9544e1458b 100644 (file)
@@ -41,7 +41,8 @@ enum ActionType {
   PrintEnums,
   PrintSets,
   GenOptParserDefs,
-  GenCTags
+  GenCTags,
+  GenAttributes
 };
 
 namespace {
@@ -85,6 +86,8 @@ namespace {
                                "Generate option definitions"),
                     clEnumValN(GenCTags, "gen-ctags",
                                "Generate ctags-compatible index"),
+                    clEnumValN(GenAttributes, "gen-attrs",
+                               "Generate attributes"),
                     clEnumValEnd));
 
   cl::opt<std::string>
@@ -165,6 +168,9 @@ bool LLVMTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
   case GenCTags:
     EmitCTags(Records, OS);
     break;
+  case GenAttributes:
+    EmitAttributes(Records, OS);
+    break;
   }
 
   return false;