brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · ab6abab Raw
83 lines · plain
1// Test that we register protocol metadata. Without registration, messaging2// a protocol metatype object crashes.3//4// RUN: %clang -c -o %t.o %s5// RUN: %llvm_jitlink -preload libobjc.A.dylib %t.o6//7// REQUIRES: jit-compatible-osx-swift-runtime8 9	.section	__TEXT,__text,regular,pure_instructions10	.build_version macos, 15, 0	sdk_version 15, 011	.globl	_main                           ; -- Begin function main12	.p2align	213_main:                                  ; @main14	.cfi_startproc15; %bb.0:16	sub	sp, sp, #3217	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill18	add	x29, sp, #1619	.cfi_def_cfa w29, 1620	.cfi_offset w30, -821	.cfi_offset w29, -1622	mov	w8, #0                          ; =0x023	str	w8, [sp, #8]                    ; 4-byte Folded Spill24	stur	wzr, [x29, #-4]25	adrp	x8, __OBJC_PROTOCOL_REFERENCE_$_P@PAGE26	ldr	x0, [x8, __OBJC_PROTOCOL_REFERENCE_$_P@PAGEOFF]27	bl	_objc_retain28	ldr	w0, [sp, #8]                    ; 4-byte Folded Reload29	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload30	add	sp, sp, #3231	ret32	.cfi_endproc33                                        ; -- End function34	.section	__TEXT,__objc_classname,cstring_literals35l_OBJC_CLASS_NAME_:                     ; @OBJC_CLASS_NAME_36	.asciz	"P"37 38	.private_extern	__OBJC_PROTOCOL_$_P     ; @"_OBJC_PROTOCOL_$_P"39	.section	__DATA,__data40	.globl	__OBJC_PROTOCOL_$_P41	.weak_definition	__OBJC_PROTOCOL_$_P42	.p2align	3, 0x043__OBJC_PROTOCOL_$_P:44	.quad	045	.quad	l_OBJC_CLASS_NAME_46	.quad	047	.quad	048	.quad	049	.quad	050	.quad	051	.quad	052	.long	96                              ; 0x6053	.long	0                               ; 0x054	.quad	055	.quad	056	.quad	057 58	.private_extern	__OBJC_LABEL_PROTOCOL_$_P ; @"_OBJC_LABEL_PROTOCOL_$_P"59	.section	__DATA,__objc_protolist,coalesced,no_dead_strip60	.globl	__OBJC_LABEL_PROTOCOL_$_P61	.weak_definition	__OBJC_LABEL_PROTOCOL_$_P62	.p2align	3, 0x063__OBJC_LABEL_PROTOCOL_$_P:64	.quad	__OBJC_PROTOCOL_$_P65 66	.private_extern	__OBJC_PROTOCOL_REFERENCE_$_P ; @"_OBJC_PROTOCOL_REFERENCE_$_P"67	.section	__DATA,__objc_protorefs,coalesced,no_dead_strip68	.globl	__OBJC_PROTOCOL_REFERENCE_$_P69	.weak_definition	__OBJC_PROTOCOL_REFERENCE_$_P70	.p2align	3, 0x071__OBJC_PROTOCOL_REFERENCE_$_P:72	.quad	__OBJC_PROTOCOL_$_P73 74	.no_dead_strip	__OBJC_PROTOCOL_$_P75	.no_dead_strip	__OBJC_LABEL_PROTOCOL_$_P76	.no_dead_strip	__OBJC_PROTOCOL_REFERENCE_$_P77	.section	__DATA,__objc_imageinfo,regular,no_dead_strip78L_OBJC_IMAGE_INFO:79	.long	080	.long	6481 82.subsections_via_symbols83