Debian Codegraph @

clang/test/CodeGen/aarch64-elf-pauthabi.c

raw
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 %s | \
9 // RUN: FileCheck %s --check-prefix=ALL
10
11 // RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \
12 // RUN: -fptrauth-intrinsics %s | FileCheck %s --check-prefix=INTRIN
13
14 // RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \
15 // RUN: -fptrauth-calls %s | FileCheck %s --check-prefix=CALL
16
17 // RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \
18 // RUN: -fptrauth-returns %s | FileCheck %s --check-prefix=RET
19
20 // RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \
21 // RUN: -fptrauth-auth-traps %s | FileCheck %s --check-prefix=TRAP
22
23 // RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \
24 // RUN: -fptrauth-calls -fptrauth-vtable-pointer-address-discrimination %s | \
25 // RUN: FileCheck %s --check-prefix=VPTRADDR
26
27 // RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \
28 // RUN: -fptrauth-calls -fptrauth-vtable-pointer-type-discrimination %s | \
29 // RUN: FileCheck %s --check-prefix=VPTRTYPE
30
31 // RUN: %clang_cc1 -triple aarch64-linux -emit-llvm -o - \
32 // RUN: -fptrauth-calls -fptrauth-init-fini %s | \
33 // RUN: FileCheck %s --check-prefix=INITFINI
34
35 // ALL: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458}
36 // ALL: !{i32 1, !"aarch64-elf-pauthabi-version", i32 127}
37
38 // INTRIN: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458}
39 // INTRIN: !{i32 1, !"aarch64-elf-pauthabi-version", i32 1}
40
41 // CALL: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458}
42 // CALL: !{i32 1, !"aarch64-elf-pauthabi-version", i32 2}
43
44 // RET: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458}
45 // RET: !{i32 1, !"aarch64-elf-pauthabi-version", i32 4}
46
47 // TRAP: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458}
48 // TRAP: !{i32 1, !"aarch64-elf-pauthabi-version", i32 8}
49
50 // VPTRADDR: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458}
51 // VPTRADDR: !{i32 1, !"aarch64-elf-pauthabi-version", i32 18}
52
53 // VPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458}
54 // VPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-version", i32 34}
55
56 // INITFINI: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458}
57 // INITFINI: !{i32 1, !"aarch64-elf-pauthabi-version", i32 66}
58
59 void foo() {}