blob: edd062a73835b709c69060a8768be414cb585197 [file] [log] [blame]
Ted Kremenek04a847e2009-03-13 22:21:17 +00001//===- 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
19namespace llvm {
20
21/// ClangDiagsDefsEmitter - The top-level class emits .def files containing
22/// declarations of Clang diagnostics.
23///
24class ClangDiagsDefsEmitter : public TableGenBackend {
25 RecordKeeper &Records;
Ted Kremenek557f7f82009-03-13 22:53:41 +000026 const std::string& Component;
Ted Kremenek04a847e2009-03-13 22:21:17 +000027public:
Ted Kremenek557f7f82009-03-13 22:53:41 +000028 explicit ClangDiagsDefsEmitter(RecordKeeper &R, const std::string& component)
29 : Records(R), Component(component) {}
Ted Kremenek04a847e2009-03-13 22:21:17 +000030
31 // run - Output the .def file contents
Daniel Dunbar1a551802009-07-03 00:10:29 +000032 void run(raw_ostream &OS);
Ted Kremenek04a847e2009-03-13 22:21:17 +000033};
34
Chris Lattnerac9e7da2009-04-15 20:02:32 +000035class ClangDiagGroupsEmitter : public TableGenBackend {
Ted Kremenek8b9d0272009-03-18 21:16:16 +000036 RecordKeeper &Records;
37public:
Chris Lattnerac9e7da2009-04-15 20:02:32 +000038 explicit ClangDiagGroupsEmitter(RecordKeeper &R) : Records(R) {}
Ted Kremenek8b9d0272009-03-18 21:16:16 +000039
Daniel Dunbar1a551802009-07-03 00:10:29 +000040 void run(raw_ostream &OS);
Ted Kremenek8b9d0272009-03-18 21:16:16 +000041};
42
43
Ted Kremenek04a847e2009-03-13 22:21:17 +000044} // End llvm namespace
45
46#endif