diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-05-03 20:17:15 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-05-03 20:17:15 +0000 |
commit | 53d2409a223a14d063faf06e4360ede09c41ed80 (patch) | |
tree | 43bf0ba0fc43ac54c19a48feecd70bccfacf13a7 /lib/Driver/Driver.cpp | |
parent | fff4a44caa5d86a2139b099442d2863f40a716f8 (diff) |
[driver - crash diagnostics] Only write the failing command in the script.
Part of rdar://11285725
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156096 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index d510a0f4f6..e22fc658a8 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -393,7 +393,12 @@ void Driver::generateCompilationDiagnostics(Compilation &C, // Save the original job command(s). std::string Cmd; llvm::raw_string_ostream OS(Cmd); - C.PrintJob(OS, C.getJobs(), "\n", false); + if (FailingCommand) + C.PrintJob(OS, *FailingCommand, "\n", false); + else + // Crash triggered by FORCE_CLANG_DIAGNOSTICS_CRASH, which doesn't have an + // associated FailingCommand, so just pass all jobs. + C.PrintJob(OS, C.getJobs(), "\n", false); OS.flush(); // Clear stale state and suppress tool output. |