Index: clang/test/Driver/crash-report-crashfile.m =================================================================== --- clang/test/Driver/crash-report-crashfile.m +++ clang/test/Driver/crash-report-crashfile.m @@ -18,6 +18,7 @@ const int x = MODULE_MACRO; // CRASH_ENV: failing because environment variable 'FORCE_CLANG_DIAGNOSTICS_CRASH' is set +// CRASH_ENV: PLEASE submit a bug report to {{.*}} and include the crash backtrace, preprocessed source, and associated run script. // CRASH_ENV: Preprocessed source(s) and associated run script(s) are located at: // CRASH_ENV-NEXT: note: diagnostic msg: {{.*}}.m // CRASH_ENV-NEXT: note: diagnostic msg: {{.*}}.cache @@ -26,6 +27,7 @@ // CRASH_ENV-NEXT: note: diagnostic msg: {{.*}}Library/Logs/DiagnosticReports{{.*}} // CRASH_FLAG: failing because '-gen-reproducer' is used +// CRASH_FLAG: PLEASE submit a bug report to {{.*}} and include the crash backtrace, preprocessed source, and associated run script. // CRASH_FLAG: Preprocessed source(s) and associated run script(s) are located at: // CRASH_FLAG-NEXT: note: diagnostic msg: {{.*}}.m // CRASH_FLAG-NEXT: note: diagnostic msg: {{.*}}.cache Index: clang/test/Driver/crash-report-modules.m =================================================================== --- clang/test/Driver/crash-report-modules.m +++ clang/test/Driver/crash-report-modules.m @@ -19,6 +19,7 @@ @import simple; const int x = MODULE_MACRO; +// CHECK: PLEASE submit a bug report to {{.*}} and include the crash backtrace, preprocessed source, and associated run script. // CHECK: Preprocessed source(s) and associated run script(s) are located at: // CHECK-NEXT: note: diagnostic msg: {{.*}}.m // CHECK-NEXT: note: diagnostic msg: {{.*}}.cache Index: clang/test/Driver/crash-report-null.test =================================================================== --- clang/test/Driver/crash-report-null.test +++ clang/test/Driver/crash-report-null.test @@ -3,5 +3,6 @@ // FIXME: Investigating. "fatal error: file 'nul' modified since it was first processed" // XFAIL: windows-gnu +// CHECK: PLEASE submit a bug report to {{.*}} and include the crash backtrace, preprocessed source, and associated run script. // CHECK: Preprocessed source(s) and associated run script(s) are located at: // CHECK-NEXT: note: diagnostic msg: {{.*}}null-{{.*}}.c Index: clang/tools/driver/driver.cpp =================================================================== --- clang/tools/driver/driver.cpp +++ clang/tools/driver/driver.cpp @@ -511,6 +511,11 @@ for (const auto &J : C->getJobs()) if (const Command *C = dyn_cast(&J)) FailingCommands.push_back(std::make_pair(-1, C)); + + // Crash using abort. + llvm::CrashRecoveryContext CRC; + CRC.DumpStackAndCleanupOnFailure = true; + CRC.RunSafely([&]() { abort(); }); } for (const auto &P : FailingCommands) {