brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 3ee9bbe Raw
80 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	4, 0x9013_main:                                  ## @main14	.cfi_startproc15## %bb.0:16	pushq	%rbp17	.cfi_def_cfa_offset 1618	.cfi_offset %rbp, -1619	movq	%rsp, %rbp20	.cfi_def_cfa_register %rbp21	subq	$16, %rsp22	movl	$0, -4(%rbp)23	movq	__OBJC_PROTOCOL_REFERENCE_$_P(%rip), %rdi24	callq	*_objc_retain@GOTPCREL(%rip)25	xorl	%eax, %eax26	addq	$16, %rsp27	popq	%rbp28	retq29	.cfi_endproc30                                        ## -- End function31	.section	__TEXT,__objc_classname,cstring_literals32L_OBJC_CLASS_NAME_:                     ## @OBJC_CLASS_NAME_33	.asciz	"P"34 35	.private_extern	__OBJC_PROTOCOL_$_P     ## @"_OBJC_PROTOCOL_$_P"36	.section	__DATA,__data37	.globl	__OBJC_PROTOCOL_$_P38	.weak_definition	__OBJC_PROTOCOL_$_P39	.p2align	3, 0x040__OBJC_PROTOCOL_$_P:41	.quad	042	.quad	L_OBJC_CLASS_NAME_43	.quad	044	.quad	045	.quad	046	.quad	047	.quad	048	.quad	049	.long	96                              ## 0x6050	.long	0                               ## 0x051	.quad	052	.quad	053	.quad	054 55	.private_extern	__OBJC_LABEL_PROTOCOL_$_P ## @"_OBJC_LABEL_PROTOCOL_$_P"56	.section	__DATA,__objc_protolist,coalesced,no_dead_strip57	.globl	__OBJC_LABEL_PROTOCOL_$_P58	.weak_definition	__OBJC_LABEL_PROTOCOL_$_P59	.p2align	3, 0x060__OBJC_LABEL_PROTOCOL_$_P:61	.quad	__OBJC_PROTOCOL_$_P62 63	.private_extern	__OBJC_PROTOCOL_REFERENCE_$_P ## @"_OBJC_PROTOCOL_REFERENCE_$_P"64	.section	__DATA,__objc_protorefs,coalesced,no_dead_strip65	.globl	__OBJC_PROTOCOL_REFERENCE_$_P66	.weak_definition	__OBJC_PROTOCOL_REFERENCE_$_P67	.p2align	3, 0x068__OBJC_PROTOCOL_REFERENCE_$_P:69	.quad	__OBJC_PROTOCOL_$_P70 71	.no_dead_strip	__OBJC_PROTOCOL_$_P72	.no_dead_strip	__OBJC_LABEL_PROTOCOL_$_P73	.no_dead_strip	__OBJC_PROTOCOL_REFERENCE_$_P74	.section	__DATA,__objc_imageinfo,regular,no_dead_strip75L_OBJC_IMAGE_INFO:76	.long	077	.long	6478 79.subsections_via_symbols80