Add initial implementation of a TableGen backend for converting Clang-warnings
[oota-llvm.git] / utils / TableGen / ClangDiagnosticsEmitter.h
diff --git a/utils/TableGen/ClangDiagnosticsEmitter.h b/utils/TableGen/ClangDiagnosticsEmitter.h
new file mode 100644 (file)
index 0000000..9397970
--- /dev/null
@@ -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