summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/TableGen.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-13 22:53:41 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-13 22:53:41 +0000
commit9750429e61dffb55035abe1514a028ccb8d1b295 (patch)
tree246960acdbc56d9ccbb6bc0eab3174ff1906db4b /llvm/utils/TableGen/TableGen.cpp
parent94d48e0bd07f19df239d11627ad3c867be2c9503 (diff)
downloadbcm5719-llvm-9750429e61dffb55035abe1514a028ccb8d1b295.tar.gz
bcm5719-llvm-9750429e61dffb55035abe1514a028ccb8d1b295.zip
Add (hidden) TableGen command option '-clang-component' which specifies the
component's warnings to process for '-gen-clang-diags-defs'. Also, when the component is specified, generate a '#if' prologue at the top of the generated .def file (to match the current files). llvm-svn: 66975
Diffstat (limited to 'llvm/utils/TableGen/TableGen.cpp')
-rw-r--r--llvm/utils/TableGen/TableGen.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/TableGen.cpp b/llvm/utils/TableGen/TableGen.cpp
index e6ed092b62f..22c5d504155 100644
--- a/llvm/utils/TableGen/TableGen.cpp
+++ b/llvm/utils/TableGen/TableGen.cpp
@@ -110,6 +110,11 @@ namespace {
cl::list<std::string>
IncludeDirs("I", cl::desc("Directory of include files"),
cl::value_desc("directory"), cl::Prefix);
+
+ cl::opt<std::string>
+ ClangComponent("clang-component",
+ cl::desc("Only use warnings from specified component"),
+ cl::value_desc("component"), cl::Hidden);
}
@@ -202,7 +207,7 @@ int main(int argc, char **argv) {
AsmWriterEmitter(Records).run(*Out);
break;
case GenClangDiagsDefs:
- ClangDiagsDefsEmitter(Records).run(*Out);
+ ClangDiagsDefsEmitter(Records, ClangComponent).run(*Out);
break;
case GenDAGISel:
DAGISelEmitter(Records).run(*Out);
OpenPOWER on IntegriCloud