Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] Put original flags on 'Driver args:' crash report line
We used to put the canonical spelling of flags after alias processing on that line. For clang-cl in particular, that meant that we put flags on that line that the clang-cl driver doesn't even accept, and the "Driver args:" line wasn't usable. Differential Revision: https://reviews.llvm.org/D110458
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// RUN: rm -rf %t | ||
// RUN: mkdir %t | ||
|
||
// RUN: env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 \ | ||
// RUN: not %clang_cl -fsyntax-only /Brepro /source-charset:utf-8 \ | ||
// RUN: -- %s 2>&1 | FileCheck %s | ||
// RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s | ||
|
||
// REQUIRES: crash-recovery | ||
|
||
#pragma clang __debug crash | ||
|
||
// CHECK: Preprocessed source(s) and associated run script(s) are located at: | ||
// CHECK-NEXT: note: diagnostic msg: {{.*}}crash-report-clang-cl-{{.*}}.c | ||
// CHECKSH: # Crash reproducer | ||
// CHECKSH-NEXT: # Driver args: {{.*}}"-fsyntax-only" | ||
// CHECKSH-SAME: /Brepro | ||
// CHECKSH-SAME: /source-charset:utf-8 | ||
// CHECKSH-NOT: -mno-incremental-linker-compatible | ||
// CHECKSH-NOT: -finput-charset=utf-8 | ||
// CHECKSH-NEXT: # Original command: {{.*$}} | ||
// CHECKSH-NEXT: "-cc1" | ||
// CHECKSH: "-main-file-name" "crash-report-clang-cl.c" | ||
// CHECKSH: "crash-report-{{[^ ]*}}.c" |