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_SERIALIZEDDIAGNOSTICPRINTER_H
11 #define LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICPRINTER_H
13 #include "clang/Basic/LLVM.h"
14 #include "clang/Frontend/SerializedDiagnostics.h"
15 #include "llvm/Bitcode/BitstreamWriter.h"
22 class DiagnosticConsumer;
23 class DiagnosticsEngine;
24 class DiagnosticOptions;
26 namespace serialized_diags {
28 /// \brief Returns a DiagnosticConsumer that serializes diagnostics to
31 /// The created DiagnosticConsumer is designed for quick and lightweight
32 /// transfer of of diagnostics to the enclosing build system (e.g., an IDE).
33 /// This allows wrapper tools for Clang to get diagnostics from Clang
34 /// (via libclang) without needing to parse Clang's command line output.
36 std::unique_ptr<DiagnosticConsumer> create(StringRef OutputFile,
37 DiagnosticOptions *Diags,
38 bool MergeChildRecords = false);
40 } // end serialized_diags namespace
41 } // end clang namespace