|
| 1 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - -mbranch-protection=pauthabi %s | FileCheck %s --check-prefix=ALL |
| 2 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - -fptrauth-returns %s | FileCheck %s --check-prefix=RET |
| 3 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - -fptrauth-calls %s | FileCheck %s --check-prefix=CALL |
| 4 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - -fptrauth-calls -fptrauth-vtable-pointer-address-discrimination %s | FileCheck %s --check-prefix=VPTRADDR |
| 5 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - -fptrauth-calls -fptrauth-vtable-pointer-type-discrimination %s | FileCheck %s --check-prefix=VPTRTYPE |
| 6 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - -fptrauth-calls -fptrauth-init-fini %s | FileCheck %s --check-prefix=INITFINI |
| 7 | + |
| 8 | +// REQUIRES: aarch64-registered-target |
| 9 | + |
| 10 | +// ALL: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 2} |
| 11 | +// ALL: !{i32 1, !"aarch64-elf-pauthabi-version", i32 31} |
| 12 | + |
| 13 | +// RET: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 2} |
| 14 | +// RET: !{i32 1, !"aarch64-elf-pauthabi-version", i32 2} |
| 15 | + |
| 16 | +// CALL: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 2} |
| 17 | +// CALL: !{i32 1, !"aarch64-elf-pauthabi-version", i32 1} |
| 18 | + |
| 19 | +// VPTRADDR: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 2} |
| 20 | +// VPTRADDR: !{i32 1, !"aarch64-elf-pauthabi-version", i32 5} |
| 21 | + |
| 22 | +// VPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 2} |
| 23 | +// VPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-version", i32 9} |
| 24 | + |
| 25 | +// INITFINI: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 2} |
| 26 | +// INITFINI: !{i32 1, !"aarch64-elf-pauthabi-version", i32 17} |
| 27 | + |
| 28 | +void foo() {} |
0 commit comments