aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-10-29 00:12:39 +0000
committerTed Kremenek <kremenek@apple.com>2011-10-29 00:12:39 +0000
commit4610ea2bcf1d0d9a23f07caee302fe61a8508c02 (patch)
treef6a8564f2f16c5911c79b43607ac35f8d846c2d5 /clang/lib/Frontend/CompilerInvocation.cpp
parent244b187d2221b8377295c311d2b79be5aa483af3 (diff)
downloadllvm-4610ea2bcf1d0d9a23f07caee302fe61a8508c02.zip
llvm-4610ea2bcf1d0d9a23f07caee302fe61a8508c02.tar.gz
llvm-4610ea2bcf1d0d9a23f07caee302fe61a8508c02.tar.bz2
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. llvm-svn: 143259
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index f1d98b9..a4851f1 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/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);