xref: /netbsd-src/external/apache2/llvm/dist/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h (revision 7330f729ccf0bd976a06f95fad452fe774fc7fd1)
1*7330f729Sjoerg //===--- SerializedDiagnosticPrinter.h - Diagnostics serializer -*- C++ -*-===//
2*7330f729Sjoerg //
3*7330f729Sjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*7330f729Sjoerg // See https://llvm.org/LICENSE.txt for license information.
5*7330f729Sjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*7330f729Sjoerg //
7*7330f729Sjoerg //===----------------------------------------------------------------------===//
8*7330f729Sjoerg 
9*7330f729Sjoerg #ifndef LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICPRINTER_H
10*7330f729Sjoerg #define LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICPRINTER_H
11*7330f729Sjoerg 
12*7330f729Sjoerg #include "clang/Basic/LLVM.h"
13*7330f729Sjoerg #include "clang/Frontend/SerializedDiagnostics.h"
14*7330f729Sjoerg #include "llvm/Bitstream/BitstreamWriter.h"
15*7330f729Sjoerg 
16*7330f729Sjoerg namespace llvm {
17*7330f729Sjoerg class raw_ostream;
18*7330f729Sjoerg }
19*7330f729Sjoerg 
20*7330f729Sjoerg namespace clang {
21*7330f729Sjoerg class DiagnosticConsumer;
22*7330f729Sjoerg class DiagnosticsEngine;
23*7330f729Sjoerg class DiagnosticOptions;
24*7330f729Sjoerg 
25*7330f729Sjoerg namespace serialized_diags {
26*7330f729Sjoerg 
27*7330f729Sjoerg /// Returns a DiagnosticConsumer that serializes diagnostics to
28*7330f729Sjoerg ///  a bitcode file.
29*7330f729Sjoerg ///
30*7330f729Sjoerg /// The created DiagnosticConsumer is designed for quick and lightweight
31*7330f729Sjoerg /// transfer of diagnostics to the enclosing build system (e.g., an IDE).
32*7330f729Sjoerg /// This allows wrapper tools for Clang to get diagnostics from Clang
33*7330f729Sjoerg /// (via libclang) without needing to parse Clang's command line output.
34*7330f729Sjoerg ///
35*7330f729Sjoerg std::unique_ptr<DiagnosticConsumer> create(StringRef OutputFile,
36*7330f729Sjoerg                                            DiagnosticOptions *Diags,
37*7330f729Sjoerg                                            bool MergeChildRecords = false);
38*7330f729Sjoerg 
39*7330f729Sjoerg } // end serialized_diags namespace
40*7330f729Sjoerg } // end clang namespace
41*7330f729Sjoerg 
42*7330f729Sjoerg #endif
43