[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / ppc-mprivileged-support-check.c
blob85b7259908a10a11c8c82429709e332641b19d50
1 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
2 // RUN: -mcpu=pwr10 -mprivileged %s -o - | FileCheck %s --check-prefix=HASPRIV
3 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
4 // RUN: -mcpu=power10 -mprivileged %s -o - | FileCheck %s --check-prefix=HASPRIV
5 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
6 // RUN: -mcpu=pwr9 -mprivileged %s -o - | FileCheck %s --check-prefix=HASPRIV
7 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
8 // RUN: -mcpu=power9 -mprivileged %s -o - | FileCheck %s --check-prefix=HASPRIV
9 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
10 // RUN: -mcpu=pwr8 -mprivileged %s -o - | FileCheck %s --check-prefix=HASPRIV
11 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
12 // RUN: -mcpu=power8 -mprivileged %s -o - | FileCheck %s --check-prefix=HASPRIV
14 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
15 // RUN: -mcpu=pwr7 -mprivileged %s 2>&1 | FileCheck %s --check-prefix=NOPRIV
16 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
17 // RUN: -mcpu=power7 -mprivileged %s 2>&1 | FileCheck %s --check-prefix=NOPRIV
19 // __SP__ TODO: Fix this test case to check for the attribute.
20 int test(void) {
21 return 0;
24 // HASPRIV: test() #0 {
25 // HASPRIV: attributes #0 = {
26 // HASPRIV-SAME: +privileged
28 // NOPRIV: option '-mprivileged' cannot be specified with