diff options
author | Justin Bogner <mail@justinbogner.com> | 2015-03-12 00:14:35 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2015-03-12 00:14:35 +0000 |
commit | 42220ed3da20abea2e15eb13a5cfe4d253f19cd0 (patch) | |
tree | 57a65029132a0a28859f09723402df3e260c6f43 /clang/lib/Driver/Driver.cpp | |
parent | 7dfb92b90b360198600477638a75fd45755d8b4e (diff) | |
download | bcm5719-llvm-42220ed3da20abea2e15eb13a5cfe4d253f19cd0.tar.gz bcm5719-llvm-42220ed3da20abea2e15eb13a5cfe4d253f19cd0.zip |
Driver: Print the clang version and original command in crash scripts
When a crash report script doesn't work for a reproduction on your
machine for one reason or another, it can be really tricky to figure
out why not. The compiler version that crashed and the original
command line before stripping flags are very helpful when this comes
up.
llvm-svn: 231989
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index a0c9233dd54..509f37904a7 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -551,6 +551,9 @@ void Driver::generateCompilationDiagnostics(Compilation &C, Diag(clang::diag::note_drv_command_failed_diag_msg) << "Error generating run script: " + Script + " " + EC.message(); } else { + ScriptOS << "# Crash reproducer for " << getClangFullVersion() << "\n" + << "# Original command: "; + Cmd.Print(ScriptOS, "\n", /*Quote=*/true); Cmd.Print(ScriptOS, "\n", /*Quote=*/true, &CrashInfo); Diag(clang::diag::note_drv_command_failed_diag_msg) << Script; } |