|
| 1 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -emit-module-interface -target-feature +pacbti -mbranch-target-enforce -std=c++20 %s -o %t.pcm |
| 2 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -std=c++20 %t.pcm -emit-llvm -o - | \ |
| 3 | +// RUN: FileCheck --check-prefixes=CHECK,CHECK-BTI %s |
| 4 | + |
| 5 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -emit-module-interface -target-feature +pacbti -msign-return-address=non-leaf -std=c++20 %s -o %t.pcm |
| 6 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -std=c++20 %t.pcm -emit-llvm -o - | \ |
| 7 | +// RUN: FileCheck --check-prefixes=CHECK,CHECK-PAC %s |
| 8 | + |
| 9 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -emit-module-interface -target-feature +pacbti -msign-return-address=all -std=c++20 %s -o %t.pcm |
| 10 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -std=c++20 %t.pcm -emit-llvm -o - | \ |
| 11 | +// RUN: FileCheck --check-prefixes=CHECK,CHECK-PAC-ALL %s |
| 12 | + |
| 13 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -emit-module-interface -target-feature +pacbti -msign-return-address=non-leaf -mbranch-target-enforce -std=c++20 %s -o %t.pcm |
| 14 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -std=c++20 %t.pcm -emit-llvm -o - | \ |
| 15 | +// RUN: FileCheck --check-prefixes=CHECK,CHECK-PAC-BTI %s |
| 16 | + |
| 17 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -emit-module-interface -target-feature +pacbti -msign-return-address=all -mbranch-target-enforce -std=c++20 %s -o %t.pcm |
| 18 | +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -std=c++20 %t.pcm -emit-llvm -o - | \ |
| 19 | +// RUN: FileCheck --check-prefixes=CHECK,CHECK-PAC-BTI-ALL %s |
| 20 | + |
| 21 | +// CHECK: define void @_ZGIW3foo() #0 |
| 22 | +// CHECK-BTI: attributes #0 = { nounwind "branch-target-enforcement" } |
| 23 | +// CHECK-PAC: attributes #0 = { nounwind "sign-return-address"="non-leaf" "sign-return-address-key"="a_key" } |
| 24 | +// CHECK-PAC-ALL: attributes #0 = { nounwind "sign-return-address"="all" "sign-return-address-key"="a_key" } |
| 25 | +// CHECK-PAC-BTI: attributes #0 = { nounwind "branch-target-enforcement" "sign-return-address"="non-leaf" "sign-return-address-key"="a_key" } |
| 26 | +// CHECK-PAC-BTI-ALL: attributes #0 = { nounwind "branch-target-enforcement" "sign-return-address"="all" "sign-return-address-key"="a_key" } |
| 27 | + |
| 28 | +module; |
| 29 | + |
| 30 | +export module foo; |
| 31 | + |
| 32 | +export void func(); |
0 commit comments