diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-13 22:21:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-13 22:21:17 +0000 |
commit | 04a847e70616cba0208c654729736a9d8f4047ac (patch) | |
tree | 287a1db1b51984ef5252724a0b947cd81a046470 /utils/TableGen/ClangDiagnosticsEmitter.h | |
parent | 02475f1fd502fa1729d1fc447417087acf9e96c8 (diff) | |
download | external_llvm-04a847e70616cba0208c654729736a9d8f4047ac.zip external_llvm-04a847e70616cba0208c654729736a9d8f4047ac.tar.gz external_llvm-04a847e70616cba0208c654729736a9d8f4047ac.tar.bz2 |
Add initial implementation of a TableGen backend for converting Clang-warnings
tablegen files to the original .def preprocessor include files. This is my first
TableGen backend; I don't claim that it is awesome.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/ClangDiagnosticsEmitter.h')
-rw-r--r-- | utils/TableGen/ClangDiagnosticsEmitter.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/utils/TableGen/ClangDiagnosticsEmitter.h b/utils/TableGen/ClangDiagnosticsEmitter.h new file mode 100644 index 0000000..9397970 --- /dev/null +++ b/utils/TableGen/ClangDiagnosticsEmitter.h @@ -0,0 +1,35 @@ +//===- ClangDiagnosticsEmitter.h - Generate Clang diagnostics tables -*- C++ -*- +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// These tablegen backends emit Clang diagnostics tables. +// +//===----------------------------------------------------------------------===// + +#ifndef CLANGDIAGS_EMITTER_H +#define CLANGDIAGS_EMITTER_H + +#include "TableGenBackend.h" + +namespace llvm { + +/// ClangDiagsDefsEmitter - The top-level class emits .def files containing +/// declarations of Clang diagnostics. +/// +class ClangDiagsDefsEmitter : public TableGenBackend { + RecordKeeper &Records; +public: + explicit ClangDiagsDefsEmitter(RecordKeeper &R) : Records(R) {} + + // run - Output the .def file contents + void run(std::ostream &OS); +}; + +} // End llvm namespace + +#endif |