clang 19.0.0git
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
16namespace llvm {
17class raw_ostream;
18}
19
20namespace clang {
21class DiagnosticConsumer;
22class DiagnosticOptions;
23
24namespace serialized_diags {
25
26/// Returns a DiagnosticConsumer that serializes diagnostics to
27/// a bitcode file.
28///
29/// The created DiagnosticConsumer is designed for quick and lightweight
30/// transfer of diagnostics to the enclosing build system (e.g., an IDE).
31/// This allows wrapper tools for Clang to get diagnostics from Clang
32/// (via libclang) without needing to parse Clang's command line output.
33///
34std::unique_ptr<DiagnosticConsumer> create(StringRef OutputFile,
35 DiagnosticOptions *Diags,
36 bool MergeChildRecords = false);
37
38} // end serialized_diags namespace
39} // end clang namespace
40
41#endif
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Options for controlling the compiler diagnostics engine.
std::unique_ptr< DiagnosticConsumer > create(StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords=false)
Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file.
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.
Definition: Dominators.h:30