34 lines · c
1// REQUIRES: lld2// UNSUPPORTED: target={{.*-(ps4|ps5)}}, target={{.*}}-zos{{.*}}3 4// RUN: echo "-nostartfiles -nostdlib -fuse-ld=lld -gen-reproducer=error -fcrash-diagnostics-dir=%t" \5// RUN: | sed -e 's/\\/\\\\/g' > %t.rsp6 7// RUN: not %clang %s @%t.rsp -fcrash-diagnostics=all -o /dev/null 2>&1 \8// RUN: | FileCheck %s9 10// Test that the reproducer can still be created even when the input source cannot be preprocessed11// again, like when reading from stdin.12// RUN: not %clang -x c - @%t.rsp -fcrash-diagnostics=all -o /dev/null 2>&1 < %s \13// RUN: | FileCheck %s14 15// check that we still get lld's output16// CHECK: error: undefined symbol: {{_?}}a17 18// CHECK: Preprocessed source(s) and associated run script(s) are located at:19// CHECK-NEXT: note: diagnostic msg: {{.*}}linker-crash-{{.*}}.tar20// CHECK-NEXT: note: diagnostic msg:21// CHECK: ********************22 23// RUN: not %clang %s @%t.rsp -fcrash-diagnostics=compiler -o /dev/null 2>&1 \24// RUN: | FileCheck %s --check-prefix=NO-LINKER25// RUN: not %clang %s @%t.rsp -o /dev/null 2>&1 \26// RUN: | FileCheck %s --check-prefix=NO-LINKER27 28// NO-LINKER-NOT: Preprocessed source(s) and associated run script(s) are located at:29 30extern int a;31int main() {32 return a;33}34