Move the enum attributes defined in Attributes.h to a table-gen file.
This is a step towards consolidating some of the information regarding
attributes in a single place.
This patch moves the enum attributes in Attributes.h to the table-gen
file. Additionally, it adds definitions of target independent string
attributes that will be used in follow-up commits by the inliner to
check attribute compatibility.
rdar://problem/19836465
llvm-svn: 252796
diff --git a/llvm/utils/TableGen/TableGen.cpp b/llvm/utils/TableGen/TableGen.cpp
index 02fe4dc..c16a558 100644
--- a/llvm/utils/TableGen/TableGen.cpp
+++ b/llvm/utils/TableGen/TableGen.cpp
@@ -41,7 +41,8 @@
PrintEnums,
PrintSets,
GenOptParserDefs,
- GenCTags
+ GenCTags,
+ GenAttributes
};
namespace {
@@ -85,6 +86,8 @@
"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 @@
case GenCTags:
EmitCTags(Records, OS);
break;
+ case GenAttributes:
+ EmitAttributes(Records, OS);
+ break;
}
return false;