summaryrefslogtreecommitdiff
path: root/clang-r353983e/include/clang/Frontend/SerializedDiagnosticPrinter.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-r353983e/include/clang/Frontend/SerializedDiagnosticPrinter.h')
-rw-r--r--clang-r353983e/include/clang/Frontend/SerializedDiagnosticPrinter.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/clang-r353983e/include/clang/Frontend/SerializedDiagnosticPrinter.h b/clang-r353983e/include/clang/Frontend/SerializedDiagnosticPrinter.h
new file mode 100644
index 00000000..5c1ff7a0
--- /dev/null
+++ b/clang-r353983e/include/clang/Frontend/SerializedDiagnosticPrinter.h
@@ -0,0 +1,42 @@
+//===--- SerializedDiagnosticPrinter.h - Diagnostics serializer -*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICPRINTER_H
+#define LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICPRINTER_H
+
+#include "clang/Basic/LLVM.h"
+#include "clang/Frontend/SerializedDiagnostics.h"
+#include "llvm/Bitcode/BitstreamWriter.h"
+
+namespace llvm {
+class raw_ostream;
+}
+
+namespace clang {
+class DiagnosticConsumer;
+class DiagnosticsEngine;
+class DiagnosticOptions;
+
+namespace serialized_diags {
+
+/// Returns a DiagnosticConsumer that serializes diagnostics to
+/// a bitcode file.
+///
+/// The created DiagnosticConsumer is designed for quick and lightweight
+/// transfer of diagnostics to the enclosing build system (e.g., an IDE).
+/// This allows wrapper tools for Clang to get diagnostics from Clang
+/// (via libclang) without needing to parse Clang's command line output.
+///
+std::unique_ptr<DiagnosticConsumer> create(StringRef OutputFile,
+ DiagnosticOptions *Diags,
+ bool MergeChildRecords = false);
+
+} // end serialized_diags namespace
+} // end clang namespace
+
+#endif