1 //===--- SerializedDiagnosticPrinter.h - Serializer for diagnostics -------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_
11 #define LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_
13 #include "clang/Basic/LLVM.h"
14 #include "llvm/Bitcode/BitstreamWriter.h"
21 class DiagnosticConsumer;
22 class DiagnosticsEngine;
23 class DiagnosticOptions;
25 namespace serialized_diags {
28 /// \brief A top-level block which represents any meta data associated
29 /// with the diagostics, including versioning of the format.
30 BLOCK_META = llvm::bitc::FIRST_APPLICATION_BLOCKID,
32 /// \brief The this block acts as a container for all the information
33 /// for a specific diagnostic.
45 RECORD_FIRST = RECORD_VERSION,
46 RECORD_LAST = RECORD_FIXIT
49 /// \brief Returns a DiagnosticConsumer that serializes diagnostics to
52 /// The created DiagnosticConsumer is designed for quick and lightweight
53 /// transfer of of diagnostics to the enclosing build system (e.g., an IDE).
54 /// This allows wrapper tools for Clang to get diagnostics from Clang
55 /// (via libclang) without needing to parse Clang's command line output.
57 DiagnosticConsumer *create(raw_ostream *OS,
58 DiagnosticOptions *diags);
60 } // end serialized_diags namespace
61 } // end clang namespace