[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / clang / test / Driver / darwin-opt-record.c
blob2e53514d35678cfff23bde8ad3f923993b672a79
1 // 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
2 // RUN: not %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
3 // RUN: %clang -target x86_64-apple-darwin10 -### -o FOO -fsave-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-DSYMUTIL-NO-G
4 // RUN: %clang -target x86_64-apple-darwin10 -### -o FOO -g0 -fsave-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-DSYMUTIL-G0
5 // 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
6 //
7 // CHECK-MULTIPLE-ARCH: "-cc1"
8 // CHECK-MULTIPLE-ARCH: "-opt-record-file" "FOO-x86_64.opt.yaml"
9 // CHECK-MULTIPLE-ARCH: "-cc1"
10 // CHECK-MULTIPLE-ARCH: "-opt-record-file" "FOO-x86_64h.opt.yaml"
12 // CHECK-MULTIPLE-ARCH-ERROR: cannot use '-foptimization-record-file' output with multiple -arch options
14 // CHECK-DSYMUTIL-NO-G: "-cc1"
15 // CHECK-DSYMUTIL-NO-G: ld
16 // CHECK-DSYMUTIL-NO-G: dsymutil
18 // Even in the presence of -g0, -fsave-optimization-record implies
19 // -gline-tables-only and would need -fno-save-optimization-record to
20 // completely disable it.
21 // CHECK-DSYMUTIL-G0: "-cc1"
22 // CHECK-DSYMUTIL-G0: ld
23 // CHECK-DSYMUTIL-G0: dsymutil
25 // CHECK-NO-G-PATH-BITSTREAM: "-cc1"
26 // CHECK-NO-G-PATH-BITSTREAM: "-opt-record-file" "[[OUTPATH:.*]].opt.bitstream"
27 // CHECK-NO-G-PATH-BITSTREAM: "-o" "[[OUTPATH:.*]].o"
28 // CHECK-NO-G-PATH-BITSTREAM: ld
29 // CHECK-NO-G-PATH-BITSTREAM: dsymutil