[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / darwin-opt-record.c
blob4a61932bc32e818371bc7c0ca68eb9f898276113
1 // REQUIRES: system-darwin
3 // RUN: %clang -target x86_64-apple-darwin10 -### -c -o FOO -fsave-optimization-record -arch x86_64 -arch x86_64h %s 2>&1 | FileCheck %s --check-prefix=CHECK-MULTIPLE-ARCH
4 // RUN: %clang -target x86_64-apple-darwin10 -### -c -o FOO -foptimization-record-file=tmp -arch x86_64 -arch x86_64h %s 2>&1 | FileCheck %s --check-prefix=CHECK-MULTIPLE-ARCH-ERROR
5 // RUN: %clang -target x86_64-apple-darwin10 -### -o FOO -fsave-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-DSYMUTIL-NO-G
6 // RUN: %clang -target x86_64-apple-darwin10 -### -o FOO -g0 -fsave-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-DSYMUTIL-G0
7 // RUN: %clang -target x86_64-apple-darwin10 -### -o FOO -fsave-optimization-record=bitstream %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-G-PATH-BITSTREAM
8 //
9 // CHECK-MULTIPLE-ARCH: "-cc1"
10 // CHECK-MULTIPLE-ARCH: "-opt-record-file" "FOO-x86_64.opt.yaml"
11 // CHECK-MULTIPLE-ARCH: "-cc1"
12 // CHECK-MULTIPLE-ARCH: "-opt-record-file" "FOO-x86_64h.opt.yaml"
14 // CHECK-MULTIPLE-ARCH-ERROR: cannot use '-foptimization-record-file' output with multiple -arch options
16 // CHECK-DSYMUTIL-NO-G: "-cc1"
17 // CHECK-DSYMUTIL-NO-G: ld
18 // CHECK-DSYMUTIL-NO-G: dsymutil
20 // Even in the presence of -g0, -fsave-optimization-record implies
21 // -gline-tables-only and would need -fno-save-optimization-record to
22 // completely disable it.
23 // CHECK-DSYMUTIL-G0: "-cc1"
24 // CHECK-DSYMUTIL-G0: ld
25 // CHECK-DSYMUTIL-G0: dsymutil
27 // CHECK-NO-G-PATH-BITSTREAM: "-cc1"
28 // CHECK-NO-G-PATH-BITSTREAM: "-opt-record-file" "[[OUTPATH:.*]].opt.bitstream"
29 // CHECK-NO-G-PATH-BITSTREAM: "-o" "[[OUTPATH:.*]].o"
30 // CHECK-NO-G-PATH-BITSTREAM: ld
31 // CHECK-NO-G-PATH-BITSTREAM: dsymutil