clang  10.0.0svn
SerializedDiagnosticPrinter.h
Go to the documentation of this file.
1 //===--- SerializedDiagnosticPrinter.h - Diagnostics serializer -*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICPRINTER_H
10 #define LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICPRINTER_H
11 
12 #include "clang/Basic/LLVM.h"
14 #include "llvm/Bitstream/BitstreamWriter.h"
15 
16 namespace llvm {
17 class raw_ostream;
18 }
19 
20 namespace clang {
21 class DiagnosticConsumer;
22 class DiagnosticsEngine;
23 class DiagnosticOptions;
24 
25 namespace serialized_diags {
26 
27 /// Returns a DiagnosticConsumer that serializes diagnostics to
28 /// a bitcode file.
29 ///
30 /// The created DiagnosticConsumer is designed for quick and lightweight
31 /// transfer of diagnostics to the enclosing build system (e.g., an IDE).
32 /// This allows wrapper tools for Clang to get diagnostics from Clang
33 /// (via libclang) without needing to parse Clang's command line output.
34 ///
35 std::unique_ptr<DiagnosticConsumer> create(StringRef OutputFile,
36  DiagnosticOptions *Diags,
37  bool MergeChildRecords = false);
38 
39 } // end serialized_diags namespace
40 } // end clang namespace
41 
42 #endif
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
Definition: Dominators.h:30
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Options for controlling the compiler diagnostics engine.
Dataflow Directional Tag Classes.
std::unique_ptr< DiagnosticConsumer > create(StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords=false)
Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file.