[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / lld-repro.c
blob7436d1a1f59be4bf44687105feb9e14ce8e5e4a6
1 // REQUIRES: lld
2 // UNSUPPORTED: ps4, ps5
4 // RUN: not %clang %s -nostartfiles -nostdlib -fuse-ld=lld -gen-reproducer=error -fcrash-diagnostics-dir=%t -fcrash-diagnostics=all 2>&1 \
5 // RUN: | FileCheck %s
7 // check that we still get lld's output
8 // CHECK: error: undefined symbol: {{_?}}a
10 // CHECK: Preprocessed source(s) and associated run script(s) are located at:
11 // CHECK-NEXT: note: diagnostic msg: {{.*}}lld-repro-{{.*}}.c
12 // CHECK-NEXT: note: diagnostic msg: {{.*}}linker-crash-{{.*}}.tar
13 // CHECK-NEXT: note: diagnostic msg: {{.*}}lld-repro-{{.*}}.sh
14 // CHECK-NEXT: note: diagnostic msg:
15 // CHECK: ********************
17 // RUN: not %clang %s -nostartfiles -nostdlib -fuse-ld=lld -gen-reproducer=error -fcrash-diagnostics-dir=%t -fcrash-diagnostics=compiler 2>&1 \
18 // RUN: | FileCheck %s --check-prefix=NO-LINKER
19 // RUN: not %clang %s -nostartfiles -nostdlib -fuse-ld=lld -gen-reproducer=error -fcrash-diagnostics-dir=%t 2>&1 \
20 // RUN: | FileCheck %s --check-prefix=NO-LINKER
22 // NO-LINKER-NOT: Preprocessed source(s) and associated run script(s) are located at:
24 extern int a;
25 int main() {
26 return a;