xref: /llvm-project/clang/test/Driver/fsplit-machine-functions.c (revision 776e3b052738a76518da1f4800a114f3733c35b0)
1 // RUN: %clang -### --target=x86_64 -fprofile-use=default.profdata -fsplit-machine-functions %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LTO-NEG
2 // RUN: %clang -### --target=aarch64 -fprofile-use=default.profdata -fsplit-machine-functions %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LTO-NEG
3 // RUN: %clang -### --target=x86_64 -fprofile-use=default.profdata -fsplit-machine-functions -fno-split-machine-functions %s -c 2>&1 | FileCheck -check-prefix=NEG %s
4 
5 // CHECK:      "-fsplit-machine-functions"
6 // CHECK-SAME: "-fprofile-instrument-use-path=default.profdata"
7 
8 // NEG-NOT:    "-fsplit-machine-functions"
9 
10 // RUN: %clang -### --target=x86_64-linux -flto -fsplit-machine-functions %s 2>&1 | FileCheck %s --check-prefix=LTO
11 // RUN: %clang -### --target=x86_64-linux -flto -fsplit-machine-functions -fno-split-machine-functions %s 2>&1 | FileCheck %s --check-prefix=LTO-NEG
12 
13 // LTO:         "-plugin-opt=-split-machine-functions"
14 // LTO-NEG-NOT: "-plugin-opt=-split-machine-functions"
15 
16 // RUN: not %clang -### -c --target=arm-unknown-linux -fsplit-machine-functions %s 2>&1 | FileCheck %s --check-prefix=ERR
17 // ERR: error: unsupported option '-fsplit-machine-functions' for target
18 
19 // RUN: %clang -### --target=arm-unknown-linux -fsplit-machine-functions -fno-split-machine-functions %s
20