Changeset View
Changeset View
Standalone View
Standalone View
utils/TableGen/TableGen.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | enum ActionType { | ||||
GenArmNeon, | GenArmNeon, | ||||
GenArmFP16, | GenArmFP16, | ||||
GenArmNeonSema, | GenArmNeonSema, | ||||
GenArmNeonTest, | GenArmNeonTest, | ||||
GenAttrDocs, | GenAttrDocs, | ||||
GenDiagDocs, | GenDiagDocs, | ||||
GenOptDocs, | GenOptDocs, | ||||
GenDataCollectors, | GenDataCollectors, | ||||
GenTestPragmaAttributeSupportedAttributes | GenTestPragmaAttributeSupportedAttributes, | ||||
GenClangOpenCLBuiltins, | |||||
}; | }; | ||||
namespace { | namespace { | ||||
cl::opt<ActionType> Action( | cl::opt<ActionType> Action( | ||||
cl::desc("Action to perform:"), | cl::desc("Action to perform:"), | ||||
cl::values( | cl::values( | ||||
clEnumValN(PrintRecords, "print-records", | clEnumValN(PrintRecords, "print-records", | ||||
"Print all records to stdout (default)"), | "Print all records to stdout (default)"), | ||||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | cl::values( | ||||
clEnumValN(GenDiagDocs, "gen-diag-docs", | clEnumValN(GenDiagDocs, "gen-diag-docs", | ||||
"Generate diagnostic documentation"), | "Generate diagnostic documentation"), | ||||
clEnumValN(GenOptDocs, "gen-opt-docs", "Generate option documentation"), | clEnumValN(GenOptDocs, "gen-opt-docs", "Generate option documentation"), | ||||
clEnumValN(GenDataCollectors, "gen-clang-data-collectors", | clEnumValN(GenDataCollectors, "gen-clang-data-collectors", | ||||
"Generate data collectors for AST nodes"), | "Generate data collectors for AST nodes"), | ||||
clEnumValN(GenTestPragmaAttributeSupportedAttributes, | clEnumValN(GenTestPragmaAttributeSupportedAttributes, | ||||
"gen-clang-test-pragma-attribute-supported-attributes", | "gen-clang-test-pragma-attribute-supported-attributes", | ||||
"Generate a list of attributes supported by #pragma clang " | "Generate a list of attributes supported by #pragma clang " | ||||
"attribute for testing purposes"))); | "attribute for testing purposes"), | ||||
clEnumValN(GenClangOpenCLBuiltins, "gen-clang-opencl-builtins", | |||||
"Generate OpenCL builtin handlers"))); | |||||
cl::opt<std::string> | cl::opt<std::string> | ||||
ClangComponent("clang-component", | ClangComponent("clang-component", | ||||
cl::desc("Only use warnings from specified component"), | cl::desc("Only use warnings from specified component"), | ||||
cl::value_desc("component"), cl::Hidden); | cl::value_desc("component"), cl::Hidden); | ||||
bool ClangTableGenMain(raw_ostream &OS, RecordKeeper &Records) { | bool ClangTableGenMain(raw_ostream &OS, RecordKeeper &Records) { | ||||
switch (Action) { | switch (Action) { | ||||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | case GenOptDocs: | ||||
EmitClangOptDocs(Records, OS); | EmitClangOptDocs(Records, OS); | ||||
break; | break; | ||||
case GenDataCollectors: | case GenDataCollectors: | ||||
EmitClangDataCollectors(Records, OS); | EmitClangDataCollectors(Records, OS); | ||||
break; | break; | ||||
case GenTestPragmaAttributeSupportedAttributes: | case GenTestPragmaAttributeSupportedAttributes: | ||||
EmitTestPragmaAttributeSupportedAttributes(Records, OS); | EmitTestPragmaAttributeSupportedAttributes(Records, OS); | ||||
break; | break; | ||||
case GenClangOpenCLBuiltins: | |||||
EmitClangOpenCLBuiltins(Records, OS); | |||||
break; | |||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
int main(int argc, char **argv) { | int main(int argc, char **argv) { | ||||
sys::PrintStackTraceOnErrorSignal(argv[0]); | sys::PrintStackTraceOnErrorSignal(argv[0]); | ||||
Show All 16 Lines |