[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / ibm-profiling.c
blob68d81da99d5b08bfac632934bf6c11743d416935
1 // Check that -pg throws an error on z/OS.
2 // RUN: not %clang -### 2>&1 --target=s390x-none-zos -S -pg %s | FileCheck -check-prefix=FAIL-PG-NAME %s
3 // FAIL-PG-NAME: error: unsupported option '-pg' for target 's390x-none-zos'
5 // Check that -p is still used when not linking on AIX.
6 // RUN: %clang -### 2>&1 --target=powerpc-ibm-aix7.1.0.0 -S -p -S %s \
7 // RUN: | FileCheck --check-prefix=CHECK %s
8 // CHECK-NOT: warning: argument unused during compilation: '-p'
10 // Check precedence: -pg is unused when passed first on AIX.
11 // RUN: %clang -### 2>&1 --target=powerpc-ibm-aix7.1.0.0 --sysroot %S/Inputs/aix_ppc_tree -pg -p %s \
12 // RUN: | FileCheck --check-prefix=CHECK2 %s
13 // CHECK2-NOT: warning: argument unused during compilation: '-p' [-Wunused-command-line-argument]
14 // CHECK2: "-isysroot" "[[SYSROOT:[^"]+]]"
15 // CHECK2: "[[SYSROOT]]/usr/lib{{/|\\\\}}mcrt0.o"
16 // CHECK2: "-L[[SYSROOT]]/lib/profiled"
17 // CHECK2: "-L[[SYSROOT]]/usr/lib/profiled"
19 // Check precedence: -p is unused when passed first on AIX.
20 // RUN: %clang -### 2>&1 --target=powerpc-ibm-aix7.1.0.0 --sysroot %S/Inputs/aix_ppc_tree -p -pg %s \
21 // RUN: | FileCheck --check-prefix=CHECK3 %s
22 // CHECK3: warning: argument unused during compilation: '-p' [-Wunused-command-line-argument]
23 // CHECK3: "-isysroot" "[[SYSROOT:[^"]+]]"
24 // CHECK3: "[[SYSROOT]]/usr/lib{{/|\\\\}}gcrt0.o"
25 // CHECK3: "-L[[SYSROOT]]/lib/profiled"
26 // CHECK3: "-L[[SYSROOT]]/usr/lib/profiled"