Ted Kremenek | 04a847e | 2009-03-13 22:21:17 +0000 | [diff] [blame] | 1 | //===- ClangDiagnosticsEmitter.h - Generate Clang diagnostics tables -*- C++ -*- |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // These tablegen backends emit Clang diagnostics tables. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef CLANGDIAGS_EMITTER_H |
| 15 | #define CLANGDIAGS_EMITTER_H |
| 16 | |
| 17 | #include "TableGenBackend.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | |
| 21 | /// ClangDiagsDefsEmitter - The top-level class emits .def files containing |
| 22 | /// declarations of Clang diagnostics. |
| 23 | /// |
| 24 | class ClangDiagsDefsEmitter : public TableGenBackend { |
| 25 | RecordKeeper &Records; |
Ted Kremenek | 557f7f8 | 2009-03-13 22:53:41 +0000 | [diff] [blame] | 26 | const std::string& Component; |
Ted Kremenek | 04a847e | 2009-03-13 22:21:17 +0000 | [diff] [blame] | 27 | public: |
Ted Kremenek | 557f7f8 | 2009-03-13 22:53:41 +0000 | [diff] [blame] | 28 | explicit ClangDiagsDefsEmitter(RecordKeeper &R, const std::string& component) |
| 29 | : Records(R), Component(component) {} |
Ted Kremenek | 04a847e | 2009-03-13 22:21:17 +0000 | [diff] [blame] | 30 | |
| 31 | // run - Output the .def file contents |
| 32 | void run(std::ostream &OS); |
| 33 | }; |
| 34 | |
Ted Kremenek | 8b9d027 | 2009-03-18 21:16:16 +0000 | [diff] [blame^] | 35 | class ClangOptionsEmitter : public TableGenBackend { |
| 36 | RecordKeeper &Records; |
| 37 | public: |
| 38 | explicit ClangOptionsEmitter(RecordKeeper &R) : Records(R) {} |
| 39 | |
| 40 | void run(std::ostream &OS); |
| 41 | }; |
| 42 | |
| 43 | |
Ted Kremenek | 04a847e | 2009-03-13 22:21:17 +0000 | [diff] [blame] | 44 | } // End llvm namespace |
| 45 | |
| 46 | #endif |