diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-13 22:53:41 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-13 22:53:41 +0000 |
commit | 557f7f88ba686886278f83159b7a629c24a47176 (patch) | |
tree | 09cd2599390ad33eed6bac86dab9b3153f9c4622 /utils/TableGen/TableGen.cpp | |
parent | 04a847e70616cba0208c654729736a9d8f4047ac (diff) |
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66975 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TableGen.cpp')
-rw-r--r-- | utils/TableGen/TableGen.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp index e6ed092b62..22c5d50415 100644 --- a/utils/TableGen/TableGen.cpp +++ b/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); |