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 "llvm/Bitcode/BitstreamWriter.h"
20 class DiagnosticConsumer;
21 class DiagnosticsEngine;
22 class DiagnosticOptions;
24 namespace serialized_diags {
27 /// \brief A top-level block which represents any meta data associated
28 /// with the diagostics, including versioning of the format.
29 BLOCK_META = llvm::bitc::FIRST_APPLICATION_BLOCKID,
31 /// \brief The this block acts as a container for all the information
32 /// for a specific diagnostic.
44 RECORD_FIRST = RECORD_VERSION,
45 RECORD_LAST = RECORD_FIXIT
48 /// \brief Returns a DiagnosticConsumer that serializes diagnostics to
51 /// The created DiagnosticConsumer is designed for quick and lightweight
52 /// transfer of of diagnostics to the enclosing build system (e.g., an IDE).
53 /// This allows wrapper tools for Clang to get diagnostics from Clang
54 /// (via libclang) without needing to parse Clang's command line output.
56 DiagnosticConsumer *create(llvm::raw_ostream *OS,
57 const DiagnosticOptions &diags);
59 } // end serialized_diags namespace
60 } // end clang namespace