[ELF] Reorder SectionBase/InputSectionBase members
[llvm-project.git] / clang / test / Frontend / arm-branch-protection-default-arch.c
blob1f12cba1820d6583be0d1929c15871c0be5c3007
1 // REQUIRES: arm-registered-target
3 /// Check warning for
4 // RUN: %clang -target arm-arm-none-eabi %s -S -o - 2>&1 | FileCheck %s
6 __attribute__((target("branch-protection=bti"))) void f1() {}
7 __attribute__((target("branch-protection=pac-ret"))) void f2() {}
8 __attribute__((target("branch-protection=bti+pac-ret"))) void f3() {}
9 __attribute__((target("branch-protection=bti+pac-ret+leaf"))) void f4() {}
11 // CHECK: warning: unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored [-Wignored-attributes]
12 // CHECK-NEXT: __attribute__((target("branch-protection=bti"))) void f1() {}
14 // CHECK: warning: unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored [-Wignored-attributes]
15 // CHECK-NEXT: __attribute__((target("branch-protection=pac-ret"))) void f2() {}
17 // CHECK: warning: unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored [-Wignored-attributes]
18 // CHECK-NEXT: __attribute__((target("branch-protection=bti+pac-ret"))) void f3() {}
20 // CHECK: warning: unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored [-Wignored-attributes]
21 // CHECK-NEXT: __attribute__((target("branch-protection=bti+pac-ret+leaf"))) void f4() {}
23 /// Check there are no branch protection function attributes
25 // CHECK-NOT: attributes { {{.*}} "sign-return-address"
26 // CHECK-NOT: attributes { {{.*}} "sign-return-address-key"
27 // CHECK-NOT: attributes { {{.*}} "branch-target-enforcement"