llvm-6502/utils/TableGen/ClangDiagnosticsEmitter.h
Ted Kremenek 557f7f88ba Add (hidden) TableGen command option '-clang-component' which specifies the
component's warnings to process for '-gen-clang-diags-defs'.

Also, when the component is specified, generate a '#if' prologue at the top of
the generated .def file (to match the current files).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66975 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 22:53:41 +00:00

38 lines
1.0 KiB
C++

//===- 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;
const std::string& Component;
public:
explicit ClangDiagsDefsEmitter(RecordKeeper &R, const std::string& component)
: Records(R), Component(component) {}
// run - Output the .def file contents
void run(std::ostream &OS);
};
} // End llvm namespace
#endif