From 7800212ef29be314d55814e8dcc568ff8beed106 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sat, 29 Oct 2011 00:12:39 +0000 Subject: Start work on SerializedDiagnosticPrinter, a new DiagnosticConsumer that serializes out the diagnostics for a given translation unit to a bit code file. This is a WIP. The motivation for this new DiagnosticConsumer is to provide a way for tools invoking the compiler to get its diagnostics via a libclang interface, rather than textually parsing the compiler output. This gives us flexibility to change the compiler's textual output, but have a structured data format for clients to use to get the diagnostics via a stable API. I have no tests for this, but llvm-bcanalyzer so far shows that the emitted file is well-formed. More work to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143259 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Frontend/CompilerInvocation.cpp') diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index f1d98b9458..a4851f1740 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1109,6 +1109,8 @@ static void ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags) { using namespace cc1options; Opts.DiagnosticLogFile = Args.getLastArgValue(OPT_diagnostic_log_file); + Opts.DiagnosticSerializationFile = + Args.getLastArgValue(OPT_diagnostic_serialized_file); Opts.IgnoreWarnings = Args.hasArg(OPT_w); Opts.NoRewriteMacros = Args.hasArg(OPT_Wno_rewrite_macros); Opts.Pedantic = Args.hasArg(OPT_pedantic); -- cgit v1.2.3