2020-09-10 08:57:03 +08:00
|
|
|
// RUN: %clang -### -target x86_64 -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s
|
|
|
|
// RUN: %clang -### -target x86_64 -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-ALL %s
|
|
|
|
// RUN: %clang -### -target x86_64 -fbasic-block-sections=list=%s %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-LIST %s
|
|
|
|
// RUN: %clang -### -target x86_64 -fbasic-block-sections=labels %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-LABELS %s
|
|
|
|
// RUN: not %clang -c -target arm-unknown-linux -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
|
2021-07-01 04:12:57 +08:00
|
|
|
// RUN: %clang -### -target arm-unknown-linux -fbasic-block-sections=all -fbasic-block-sections=none %s -S 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=CHECK-NOOPT %s
|
2020-09-10 08:57:03 +08:00
|
|
|
// RUN: not %clang -c -target x86_64-apple-darwin10 -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
|
2020-10-21 07:39:44 +08:00
|
|
|
// RUN: %clang -### -target x86_64 -fbasic-block-sections=alll %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s
|
|
|
|
// RUN: %clang -### -target x86_64 -fbasic-block-sections=list %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s
|
|
|
|
// RUN: %clang -### -target x86_64 -fbasic-block-sections=list= %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NULL-LIST %s
|
2021-07-01 04:12:57 +08:00
|
|
|
// RUN: %clang -### -target x86_64 -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s
|
|
|
|
// RUN: %clang -### -x cuda -nocudainc -nocudalib -target x86_64 -fbasic-block-sections=all %s -c 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=CHECK-CUDA %s
|
|
|
|
|
2020-06-02 14:17:29 +08:00
|
|
|
//
|
2021-07-01 04:12:57 +08:00
|
|
|
// CHECK-NOOPT-NOT: -fbasic-block-sections=
|
2020-09-10 08:57:03 +08:00
|
|
|
// CHECK-OPT-NONE: "-fbasic-block-sections=none"
|
|
|
|
// CHECK-OPT-ALL: "-fbasic-block-sections=all"
|
|
|
|
// CHECK-OPT-LIST: "-fbasic-block-sections={{[^ ]*}}fbasic-block-sections.c"
|
2020-06-02 14:17:29 +08:00
|
|
|
// CHECK-OPT-LABELS: "-fbasic-block-sections=labels"
|
2020-09-10 08:57:03 +08:00
|
|
|
// CHECK-TRIPLE: error: unsupported option '-fbasic-block-sections=all' for target
|
2020-10-21 07:39:44 +08:00
|
|
|
// CHECK-INVALID-VALUE: error: invalid value {{[^ ]*}} in '-fbasic-block-sections={{.*}}'
|
|
|
|
// CHECK-OPT-NULL-LIST: "-fbasic-block-sections=list="
|
2021-07-01 04:12:57 +08:00
|
|
|
|
|
|
|
// GPU-side compilations should have no -fbasic-block-sections. It should only
|
|
|
|
// be passed to the host compilation
|
|
|
|
// CHECK-CUDA-NOT: -fbasic-block-sections=
|
|
|
|
// CHECK-CUDA: "-cc1" "-triple" "x86_64"
|
|
|
|
// CHECK-CUDA-SAME: "-fbasic-block-sections=all"
|