File: module-flags-ptrauth-abi-version-a.ll

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (35 lines) | stat: -rw-r--r-- 2,024 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
; RUN: llvm-link %p/Inputs/module-flags-ptrauth-abi-version-5.ll %p/Inputs/module-flags-ptrauth-abi-version-5.ll -S -o - | FileCheck %s --check-prefix=SAME --check-prefix=CHECK
; RUN: llvm-link %p/Inputs/module-flags-ptrauth-abi-version-3.ll %p/Inputs/module-flags-ptrauth-abi-version-5.ll -S -o - | FileCheck %s --check-prefix=DIFFERENT --check-prefix=CHECK
; RUN: llvm-link %p/Inputs/module-flags-ptrauth-abi-version-3.ll %p/Inputs/module-flags-ptrauth-abi-version-5.ll %p/Inputs/module-flags-ptrauth-abi-version-3.ll -S -o - | FileCheck %s --check-prefix=DIFFERENT-MORE --check-prefix=CHECK
; RUN: llvm-link %s %p/Inputs/module-flags-ptrauth-abi-version-3.ll -S -o - | FileCheck %s --check-prefix=EMPTY --check-prefix=CHECK


; CHECK: !llvm.module.flags = !{!0}
; CHECK: !0 = {{(distinct )?}}!{i32 6, !"ptrauth.abi-version", !1}

; test linking modules with the same ptrauth.abi-version: it should merge them
; SAME: !1 = distinct !{!2}
; SAME: !2 = !{i32 5, i1 false}

; test linking modules with different ptrauth.abi-versions: it should append them
; DIFFERENT: !1 = distinct !{!2, !3}
; DIFFERENT: !2 = !{i32 3, i1 false}
; DIFFERENT: !3 = !{i32 5, i1 false}

; test linking modules with three different ptrauth.abi-versions where two are the same: it should unique and append them
; DIFFERENT-MORE: !1 = distinct !{!2, !3}
; DIFFERENT-MORE: !2 = !{i32 3, i1 false}
; DIFFERENT-MORE: !3 = !{i32 5, i1 false}

; test linking modules with no ptrauth.abi-version on one side: it should pick it up from the one that has it
; EMPTY: !1 = !{!2}
; EMPTY: !2 = !{i32 3, i1 false}

; FIXME: test linking modules with no ptrauth.abi-version on one side: we
; auto-upgrade it to the version -1, and append it. We can't do this now because
; the module materializer doesn't run the auto-upgrader during llvm-link.

; test linking modules with different modes: kernel and userand user: it should append them
; DIFFERENT-KERNEL: !1 = !{!2, !3}
; DIFFERENT-KERNEL: !2 = !{i32 3, i1 true}
; DIFFERENT-KERNEL: !3 = !{i32 3, i1 false}