diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-11-11 00:07:43 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-11-11 00:07:43 +0000 |
commit | 36f6e30d5c21a693abf2612ef086e83e9696f0e0 (patch) | |
tree | 0a287cd1d211f48eb34a2a7b5bd6c47953806a2c /lib/Driver/Tools.cpp | |
parent | acdfa4d504a8f2514d60569f9ce55d45f11795b9 (diff) |
Add top-level driver option '--serialize-diagnostics' for serialize compiler diagnostics to a file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 6576fcae3e..9faac7174a 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2213,6 +2213,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_dM); Args.AddLastArg(CmdArgs, options::OPT_dD); + + // Handle serialized diagnostics. + if (Arg *A = Args.getLastArg(options::OPT__serialize_diags)) { + CmdArgs.push_back("-serialize-diagnostic-file"); + CmdArgs.push_back(Args.MakeArgString(A->getValue(Args))); + } // Forward -Xclang arguments to -cc1, and -mllvm arguments to the LLVM option // parser. |