| 1 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 2 |
// RUN: -fptrauth-intrinsics \ |
| 3 |
// RUN: -fptrauth-calls \ |
| 4 |
// RUN: -fptrauth-returns \ |
| 5 |
// RUN: -fptrauth-auth-traps \ |
| 6 |
// RUN: -fptrauth-vtable-pointer-address-discrimination \ |
| 7 |
// RUN: -fptrauth-vtable-pointer-type-discrimination \ |
| 8 |
// RUN: -fptrauth-init-fini \ |
| 9 |
// RUN: -fptrauth-init-fini-address-discrimination \ |
| 10 |
// RUN: -fptrauth-elf-got \ |
| 11 |
// RUN: -fptrauth-indirect-gotos \ |
| 12 |
// RUN: -fptrauth-type-info-vtable-pointer-discrimination \ |
| 13 |
// RUN: -fptrauth-function-pointer-type-discrimination %s | \ |
| 14 |
// RUN: FileCheck %s --check-prefix=ALL |
| 15 |
|
| 16 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 17 |
// RUN: -fptrauth-intrinsics %s | FileCheck %s --check-prefix=INTRIN |
| 18 |
|
| 19 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 20 |
// RUN: -fptrauth-calls %s | FileCheck %s --check-prefix=CALL |
| 21 |
|
| 22 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 23 |
// RUN: -fptrauth-returns %s | FileCheck %s --check-prefix=RET |
| 24 |
|
| 25 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 26 |
// RUN: -fptrauth-auth-traps %s | FileCheck %s --check-prefix=TRAP |
| 27 |
|
| 28 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 29 |
// RUN: -fptrauth-calls -fptrauth-vtable-pointer-address-discrimination %s | \ |
| 30 |
// RUN: FileCheck %s --check-prefix=VPTRADDR |
| 31 |
|
| 32 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 33 |
// RUN: -fptrauth-calls -fptrauth-vtable-pointer-type-discrimination %s | \ |
| 34 |
// RUN: FileCheck %s --check-prefix=VPTRTYPE |
| 35 |
|
| 36 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 37 |
// RUN: -fptrauth-calls -fptrauth-init-fini %s | \ |
| 38 |
// RUN: FileCheck %s --check-prefix=INITFINI |
| 39 |
|
| 40 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 41 |
// RUN: -fptrauth-calls -fptrauth-init-fini -fptrauth-init-fini-address-discrimination %s | \ |
| 42 |
// RUN: FileCheck %s --check-prefix=INITFINIADDR |
| 43 |
|
| 44 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 45 |
// RUN: -fptrauth-elf-got %s | FileCheck %s --check-prefix=ELFGOT |
| 46 |
|
| 47 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 48 |
// RUN: -fptrauth-indirect-gotos %s | FileCheck %s --check-prefix=GOTOS |
| 49 |
|
| 50 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 51 |
// RUN: -fptrauth-calls -fptrauth-type-info-vtable-pointer-discrimination %s | \ |
| 52 |
// RUN: FileCheck %s --check-prefix=TYPEINFO |
| 53 |
|
| 54 |
// RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \ |
| 55 |
// RUN: -fptrauth-calls -fptrauth-function-pointer-type-discrimination %s | \ |
| 56 |
// RUN: FileCheck %s --check-prefix=FPTRTYPE |
| 57 |
|
| 58 |
// ALL: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 59 |
// ALL: !{i32 1, !"aarch64-elf-pauthabi-version", i32 4095} |
| 60 |
|
| 61 |
// INTRIN: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 62 |
// INTRIN: !{i32 1, !"aarch64-elf-pauthabi-version", i32 1} |
| 63 |
|
| 64 |
// CALL: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 65 |
// CALL: !{i32 1, !"aarch64-elf-pauthabi-version", i32 2} |
| 66 |
|
| 67 |
// RET: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 68 |
// RET: !{i32 1, !"aarch64-elf-pauthabi-version", i32 4} |
| 69 |
|
| 70 |
// TRAP: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 71 |
// TRAP: !{i32 1, !"aarch64-elf-pauthabi-version", i32 8} |
| 72 |
|
| 73 |
// VPTRADDR: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 74 |
// VPTRADDR: !{i32 1, !"aarch64-elf-pauthabi-version", i32 18} |
| 75 |
|
| 76 |
// VPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 77 |
// VPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-version", i32 34} |
| 78 |
|
| 79 |
// INITFINI: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 80 |
// INITFINI: !{i32 1, !"aarch64-elf-pauthabi-version", i32 66} |
| 81 |
|
| 82 |
// INITFINIADDR: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 83 |
// INITFINIADDR: !{i32 1, !"aarch64-elf-pauthabi-version", i32 194} |
| 84 |
|
| 85 |
// ELFGOT: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 86 |
// ELFGOT: !{i32 1, !"aarch64-elf-pauthabi-version", i32 256} |
| 87 |
|
| 88 |
// GOTOS: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 89 |
// GOTOS: !{i32 1, !"aarch64-elf-pauthabi-version", i32 512} |
| 90 |
|
| 91 |
// TYPEINFO: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 92 |
// TYPEINFO: !{i32 1, !"aarch64-elf-pauthabi-version", i32 1026} |
| 93 |
|
| 94 |
// FPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 95 |
// FPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-version", i32 2050} |
| 96 |
|
| 97 |
void foo() {} |