clang API Documentation
00001 //===--- SerializedDiagnosticPrinter.h - Serializer for diagnostics -------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 00010 #ifndef LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICPRINTER_H 00011 #define LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICPRINTER_H 00012 00013 #include "clang/Basic/LLVM.h" 00014 #include "clang/Frontend/SerializedDiagnostics.h" 00015 #include "llvm/Bitcode/BitstreamWriter.h" 00016 00017 namespace llvm { 00018 class raw_ostream; 00019 } 00020 00021 namespace clang { 00022 class DiagnosticConsumer; 00023 class DiagnosticsEngine; 00024 class DiagnosticOptions; 00025 00026 namespace serialized_diags { 00027 00028 /// \brief Returns a DiagnosticConsumer that serializes diagnostics to 00029 /// a bitcode file. 00030 /// 00031 /// The created DiagnosticConsumer is designed for quick and lightweight 00032 /// transfer of of diagnostics to the enclosing build system (e.g., an IDE). 00033 /// This allows wrapper tools for Clang to get diagnostics from Clang 00034 /// (via libclang) without needing to parse Clang's command line output. 00035 /// 00036 std::unique_ptr<DiagnosticConsumer> create(StringRef OutputFile, 00037 DiagnosticOptions *Diags, 00038 bool MergeChildRecords = false); 00039 00040 } // end serialized_diags namespace 00041 } // end clang namespace 00042 00043 #endif