|
1 | 1 | # RUN: %clang -c -o %t %s |
2 | 2 | # RUN: %llvm_jitlink -preload /usr/lib/swift/libswiftCore.dylib %t |
3 | 3 |
|
4 | | -# REQUIRES: osx-swift-runtime |
| 4 | +# REQUIRES: jit-compatible-osx-swift-runtime |
5 | 5 |
|
6 | 6 | # Check that _typeByName is able to find a type registered by metadata in |
7 | 7 | # the __swift5_types section. |
8 | 8 |
|
9 | | - .section __TEXT,__text,regular,pure_instructions |
10 | | - .globl _main |
11 | | - .p2align 4, 0x90 |
| 9 | + .section __TEXT,__text,regular,pure_instructions |
| 10 | + .build_version macos, 14, 0 sdk_version 14, 0 |
| 11 | + .globl _main |
| 12 | + .p2align 4, 0x90 |
12 | 13 | _main: |
13 | | - .cfi_startproc |
14 | | - pushq %rbp |
15 | | - .cfi_def_cfa_offset 16 |
16 | | - .cfi_offset %rbp, -16 |
17 | | - movq %rsp, %rbp |
18 | | - .cfi_def_cfa_register %rbp |
19 | | - # Constant String for "4Test3FooV" |
20 | | - movabsq $8018152761824990260, %rdi |
21 | | - movabsq $-1585267068834392465, %rsi |
22 | | - callq _$ss11_typeByNameyypXpSgSSF |
23 | | - xorl %edi, %edi |
24 | | - testq %rax, %rax |
25 | | - sete %dil |
26 | | - callq _exit |
27 | | - .cfi_endproc |
28 | | - |
29 | | - .private_extern _$s4Test3FooVMa |
30 | | - .globl _$s4Test3FooVMa |
31 | | - .p2align 4, 0x90 |
| 14 | + .cfi_startproc |
| 15 | + pushq %rbp |
| 16 | + .cfi_def_cfa_offset 16 |
| 17 | + .cfi_offset %rbp, -16 |
| 18 | + movq %rsp, %rbp |
| 19 | + .cfi_def_cfa_register %rbp |
| 20 | + # Constant String for "4Test3FooV" |
| 21 | + movabsq $8018152761824990260, %rdi |
| 22 | + movabsq $-1585267068834392465, %rsi |
| 23 | + callq _$ss11_typeByNameyypXpSgSSF |
| 24 | + xorl %edi, %edi |
| 25 | + testq %rax, %rax |
| 26 | + sete %dil |
| 27 | + callq _exit |
| 28 | + .cfi_endproc |
| 29 | + |
| 30 | + .private_extern _$s4Test3FooVACycfC |
| 31 | + .globl _$s4Test3FooVACycfC |
| 32 | + .p2align 4, 0x90 |
| 33 | +_$s4Test3FooVACycfC: |
| 34 | + pushq %rbp |
| 35 | + movq %rsp, %rbp |
| 36 | + popq %rbp |
| 37 | + retq |
| 38 | + |
| 39 | + .private_extern _$s4Test3FooVMa |
| 40 | + .globl _$s4Test3FooVMa |
| 41 | + .p2align 4, 0x90 |
32 | 42 | _$s4Test3FooVMa: |
33 | | - leaq _$s4Test3FooVMf+8(%rip), %rax |
34 | | - xorl %edx, %edx |
35 | | - retq |
36 | | - |
37 | | - .section __TEXT,__const |
38 | | -l___unnamed_1: |
39 | | - .asciz "Test" |
40 | | - |
41 | | - .private_extern _$s4TestMXM |
42 | | - .globl _$s4TestMXM |
43 | | - .weak_definition _$s4TestMXM |
44 | | - .p2align 2 |
| 43 | + leaq _$s4Test3FooVMf+8(%rip), %rax |
| 44 | + xorl %edx, %edx |
| 45 | + retq |
| 46 | + |
| 47 | + .section __TEXT,__swift5_entry,regular,no_dead_strip |
| 48 | + .p2align 2 |
| 49 | +l_entry_point: |
| 50 | + .long _main-l_entry_point |
| 51 | + .long 0 |
| 52 | + |
| 53 | + .section __TEXT,__const |
| 54 | +l_.str.4.Test: |
| 55 | + .asciz "Test" |
| 56 | + |
| 57 | + .private_extern _$s4TestMXM |
| 58 | + .globl _$s4TestMXM |
| 59 | + .weak_definition _$s4TestMXM |
| 60 | + .p2align 2 |
45 | 61 | _$s4TestMXM: |
46 | | - .long 0 |
47 | | - .long 0 |
48 | | - .long (l___unnamed_1-_$s4TestMXM)-8 |
| 62 | + .long 0 |
| 63 | + .long 0 |
| 64 | + .long (l_.str.4.Test-_$s4TestMXM)-8 |
49 | 65 |
|
50 | | -l___unnamed_2: |
51 | | - .asciz "Foo" |
| 66 | +l_.str.3.Foo: |
| 67 | + .asciz "Foo" |
52 | 68 |
|
53 | | - .private_extern _$s4Test3FooVMn |
54 | | - .globl _$s4Test3FooVMn |
55 | | - .p2align 2 |
| 69 | + .private_extern _$s4Test3FooVMn |
| 70 | + .globl _$s4Test3FooVMn |
| 71 | + .p2align 2 |
56 | 72 | _$s4Test3FooVMn: |
57 | | - .long 81 |
58 | | - .long (_$s4TestMXM-_$s4Test3FooVMn)-4 |
59 | | - .long (l___unnamed_2-_$s4Test3FooVMn)-8 |
60 | | - .long (_$s4Test3FooVMa-_$s4Test3FooVMn)-12 |
61 | | - .long (_$s4Test3FooVMF-_$s4Test3FooVMn)-16 |
62 | | - .long 0 |
63 | | - .long 2 |
64 | | - |
65 | | - .section __DATA,__const |
66 | | - .p2align 3 |
| 73 | + .long 81 |
| 74 | + .long (_$s4TestMXM-_$s4Test3FooVMn)-4 |
| 75 | + .long (l_.str.3.Foo-_$s4Test3FooVMn)-8 |
| 76 | + .long (_$s4Test3FooVMa-_$s4Test3FooVMn)-12 |
| 77 | + .long (_$s4Test3FooVMF-_$s4Test3FooVMn)-16 |
| 78 | + .long 0 |
| 79 | + .long 2 |
| 80 | + |
| 81 | + .section __DATA,__const |
| 82 | + .p2align 3 |
67 | 83 | _$s4Test3FooVMf: |
68 | | - .quad _$sytWV |
69 | | - .quad 512 |
70 | | - .quad _$s4Test3FooVMn |
71 | | - |
72 | | - .private_extern "_symbolic _____ 4Test3FooV" |
73 | | - .section __TEXT,__swift5_typeref,regular,no_dead_strip |
74 | | - .globl "_symbolic _____ 4Test3FooV" |
75 | | - .weak_definition "_symbolic _____ 4Test3FooV" |
76 | | - .p2align 1 |
| 84 | + .quad _$sytWV |
| 85 | + .quad 512 |
| 86 | + .quad _$s4Test3FooVMn |
| 87 | + |
| 88 | + .private_extern "_symbolic _____ 4Test3FooV" |
| 89 | + .section __TEXT,__swift5_typeref |
| 90 | + .globl "_symbolic _____ 4Test3FooV" |
| 91 | + .weak_definition "_symbolic _____ 4Test3FooV" |
| 92 | + .p2align 1 |
77 | 93 | "_symbolic _____ 4Test3FooV": |
78 | | - .byte 1 |
79 | | - .long (_$s4Test3FooVMn-"_symbolic _____ 4Test3FooV")-1 |
80 | | - .byte 0 |
| 94 | + .byte 1 |
| 95 | + .long (_$s4Test3FooVMn-"_symbolic _____ 4Test3FooV")-1 |
| 96 | + .byte 0 |
81 | 97 |
|
82 | | - .section __TEXT,__swift5_fieldmd,regular,no_dead_strip |
83 | | - .p2align 2 |
| 98 | + .section __TEXT,__swift5_fieldmd |
| 99 | + .p2align 2 |
84 | 100 | _$s4Test3FooVMF: |
85 | | - .long "_symbolic _____ 4Test3FooV"-_$s4Test3FooVMF |
86 | | - .long 0 |
87 | | - .short 0 |
88 | | - .short 12 |
89 | | - .long 0 |
90 | | - |
91 | | - .section __TEXT,__swift5_types,regular,no_dead_strip |
92 | | - .p2align 2 |
93 | | -l_type_metadata_table: |
94 | | - .long _$s4Test3FooVMn-l_type_metadata_table |
| 101 | + .long "_symbolic _____ 4Test3FooV"-_$s4Test3FooVMF |
| 102 | + .long 0 |
| 103 | + .short 0 |
| 104 | + .short 12 |
| 105 | + .long 0 |
| 106 | + |
| 107 | + .section __TEXT,__swift5_types |
| 108 | + .p2align 2 |
| 109 | +l_$s4Test3FooVHn: |
| 110 | + .long _$s4Test3FooVMn-l_$s4Test3FooVHn |
| 111 | + |
| 112 | + .private_extern ___swift_reflection_version |
| 113 | + .section __TEXT,__const |
| 114 | + .globl ___swift_reflection_version |
| 115 | + .weak_definition ___swift_reflection_version |
| 116 | + .p2align 1 |
| 117 | +___swift_reflection_version: |
| 118 | + .short 3 |
| 119 | + |
| 120 | + .section __DATA,__objc_imageinfo,regular,no_dead_strip |
| 121 | +L_OBJC_IMAGE_INFO: |
| 122 | + .long 0 |
| 123 | + .long 84477760 |
| 124 | + |
| 125 | + .globl _$s4Test3FooVN |
| 126 | + .private_extern _$s4Test3FooVN |
| 127 | + .alt_entry _$s4Test3FooVN |
| 128 | +.set _$s4Test3FooVN, _$s4Test3FooVMf+8 |
| 129 | +.subsections_via_symbols |
0 commit comments