From 04a847e70616cba0208c654729736a9d8f4047ac Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 13 Mar 2009 22:21:17 +0000 Subject: 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 --- utils/TableGen/ClangDiagnosticsEmitter.h | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 utils/TableGen/ClangDiagnosticsEmitter.h (limited to 'utils/TableGen/ClangDiagnosticsEmitter.h') 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 -- cgit v1.1