annotate clang/test/CodeGenObjC/metadata-symbols-64.m @ 206:f17a3b42b08b

Added tag before-12 for changeset b7591485f4cd
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 07 Jun 2021 21:25:57 +0900 (2021-06-07)
parents 0572611fdcc8
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-dispatch-method=mixed -emit-llvm -o - %s | FileCheck %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // CHECK: @"OBJC_IVAR_$_A._ivar" = global {{.*}} section "__DATA, __objc_ivar", align 8
anatofuz
parents:
diff changeset
4 // CHECK: @_objc_empty_cache = external global
anatofuz
parents:
diff changeset
5 // CHECK: @_objc_empty_vtable = external global
anatofuz
parents:
diff changeset
6 // CHECK: @"OBJC_CLASS_$_A" = global
anatofuz
parents:
diff changeset
7 // CHECK: @"OBJC_METACLASS_$_A" = global {{.*}} section "__DATA, __objc_data", align 8
anatofuz
parents:
diff changeset
8 // CHECK: @OBJC_CLASS_NAME_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_classname,cstring_literals", align 1
anatofuz
parents:
diff changeset
9 // CHECK: @OBJC_METH_VAR_NAME_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_methname,cstring_literals", align 1
anatofuz
parents:
diff changeset
10 // CHECK: @OBJC_METH_VAR_TYPE_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_methtype,cstring_literals", align 1
anatofuz
parents:
diff changeset
11 // CHECK: @"_OBJC_$_CLASS_METHODS_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
12 // CHECK: @"_OBJC_$_PROTOCOL_INSTANCE_METHODS_P" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
13 // CHECK: @"_OBJC_$_PROTOCOL_CLASS_METHODS_P" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
14 // CHECK: @"_OBJC_PROTOCOL_$_P" = weak hidden global {{.*}}, align 8
anatofuz
parents:
diff changeset
15 // CHECK: @"_OBJC_LABEL_PROTOCOL_$_P" = weak hidden global {{.*}} section "__DATA,__objc_protolist,coalesced,no_dead_strip", align 8
anatofuz
parents:
diff changeset
16 // CHECK: @"_OBJC_CLASS_PROTOCOLS_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
17 // CHECK: @"_OBJC_METACLASS_RO_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
18 // CHECK: @"_OBJC_$_INSTANCE_METHODS_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
19 // CHECK: @"_OBJC_$_INSTANCE_VARIABLES_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
20 // CHECK: @OBJC_PROP_NAME_ATTR_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_methname,cstring_literals", align 1
150
anatofuz
parents:
diff changeset
21 // CHECK: @"_OBJC_$_PROP_LIST_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
22 // CHECK: @"_OBJC_CLASS_RO_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
23 // CHECK: @"_OBJC_$_CATEGORY_INSTANCE_METHODS_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
24 // CHECK: @"_OBJC_$_CATEGORY_CLASS_METHODS_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
anatofuz
parents:
diff changeset
25 // CHECK: @"_OBJC_$_CATEGORY_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
26 // CHECK: @"OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = private global {{.*}} section "__DATA,__objc_superrefs,regular,no_dead_strip", align 8
150
anatofuz
parents:
diff changeset
27 // CHECK: @OBJC_SELECTOR_REFERENCES_ = internal externally_initialized global {{.*}} section "__DATA,__objc_selrefs,literal_pointers,no_dead_strip"
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
28 // CHECK: @"OBJC_CLASSLIST_SUP_REFS_$_{{[\.0-9]*}}" = private global {{.*}} section "__DATA,__objc_superrefs,regular,no_dead_strip", align 8
150
anatofuz
parents:
diff changeset
29 // CHECK: @"OBJC_CLASS_$_B" = external global
anatofuz
parents:
diff changeset
30 // CHECK: @"OBJC_CLASSLIST_REFERENCES_$_{{[0-9]*}}" = internal global {{.*}} section "__DATA,__objc_classrefs,regular,no_dead_strip", align 8
anatofuz
parents:
diff changeset
31 // CHECK: @_objc_msgSend_fixup_alloc = weak hidden global {{.*}} section "__DATA,__objc_msgrefs,coalesced", align 16
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
32 // CHECK: @"OBJC_LABEL_CLASS_$" = private global {{.*}} section "__DATA,__objc_classlist,regular,no_dead_strip", align 8
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
33 // CHECK: @"OBJC_LABEL_CATEGORY_$" = private global {{.*}} section "__DATA,__objc_catlist,regular,no_dead_strip", align 8
150
anatofuz
parents:
diff changeset
34 // CHECK: @objc_msgSend_fpret(
anatofuz
parents:
diff changeset
35 // CHECK: @objc_msgSend_fixup(
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 /*
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 Here is a handy command for looking at llvm-gcc's output:
anatofuz
parents:
diff changeset
41 llvm-gcc -m64 -emit-llvm -S -o - metadata-symbols-64.m | \
anatofuz
parents:
diff changeset
42 grep '=.*global' | \
anatofuz
parents:
diff changeset
43 sed -e 's#global.*, section#global ... section#' | \
anatofuz
parents:
diff changeset
44 sort
anatofuz
parents:
diff changeset
45
anatofuz
parents:
diff changeset
46 */
anatofuz
parents:
diff changeset
47
anatofuz
parents:
diff changeset
48 @interface B
anatofuz
parents:
diff changeset
49 @end
anatofuz
parents:
diff changeset
50 @interface C
anatofuz
parents:
diff changeset
51 @end
anatofuz
parents:
diff changeset
52
anatofuz
parents:
diff changeset
53 @protocol P
anatofuz
parents:
diff changeset
54 +(void) fm0;
anatofuz
parents:
diff changeset
55 -(void) im0;
anatofuz
parents:
diff changeset
56 @end
anatofuz
parents:
diff changeset
57
anatofuz
parents:
diff changeset
58 @interface A<P> {
anatofuz
parents:
diff changeset
59 int _ivar;
anatofuz
parents:
diff changeset
60 }
anatofuz
parents:
diff changeset
61
anatofuz
parents:
diff changeset
62 @property (assign) int ivar;
anatofuz
parents:
diff changeset
63
anatofuz
parents:
diff changeset
64 +(void) fm0;
anatofuz
parents:
diff changeset
65 -(void) im0;
anatofuz
parents:
diff changeset
66 @end
anatofuz
parents:
diff changeset
67
anatofuz
parents:
diff changeset
68 @implementation A
anatofuz
parents:
diff changeset
69 @synthesize ivar = _ivar;
anatofuz
parents:
diff changeset
70 +(void) fm0 {
anatofuz
parents:
diff changeset
71 }
anatofuz
parents:
diff changeset
72 -(void) im0 {
anatofuz
parents:
diff changeset
73 }
anatofuz
parents:
diff changeset
74 @end
anatofuz
parents:
diff changeset
75
anatofuz
parents:
diff changeset
76 @implementation A (Cat)
anatofuz
parents:
diff changeset
77 +(void) fm1 {
anatofuz
parents:
diff changeset
78 }
anatofuz
parents:
diff changeset
79 -(void) im1 {
anatofuz
parents:
diff changeset
80 }
anatofuz
parents:
diff changeset
81 @end
anatofuz
parents:
diff changeset
82
anatofuz
parents:
diff changeset
83 @interface D : A
anatofuz
parents:
diff changeset
84 @end
anatofuz
parents:
diff changeset
85
anatofuz
parents:
diff changeset
86 @implementation D
anatofuz
parents:
diff changeset
87 +(void) fm2 {
anatofuz
parents:
diff changeset
88 [super fm1];
anatofuz
parents:
diff changeset
89 }
anatofuz
parents:
diff changeset
90 -(void) im2 {
anatofuz
parents:
diff changeset
91 [super im1];
anatofuz
parents:
diff changeset
92 }
anatofuz
parents:
diff changeset
93 @end
anatofuz
parents:
diff changeset
94
anatofuz
parents:
diff changeset
95 // Test for FP dispatch method APIs
anatofuz
parents:
diff changeset
96 @interface Example
anatofuz
parents:
diff changeset
97 @end
anatofuz
parents:
diff changeset
98
anatofuz
parents:
diff changeset
99 float FLOAT;
anatofuz
parents:
diff changeset
100 double DOUBLE;
anatofuz
parents:
diff changeset
101 long double LONGDOUBLE;
anatofuz
parents:
diff changeset
102 id ID;
anatofuz
parents:
diff changeset
103
anatofuz
parents:
diff changeset
104 @implementation Example
anatofuz
parents:
diff changeset
105 - (double) RET_DOUBLE
anatofuz
parents:
diff changeset
106 {
anatofuz
parents:
diff changeset
107 return DOUBLE;
anatofuz
parents:
diff changeset
108 }
anatofuz
parents:
diff changeset
109 - (float) RET_FLOAT
anatofuz
parents:
diff changeset
110 {
anatofuz
parents:
diff changeset
111 return FLOAT;
anatofuz
parents:
diff changeset
112 }
anatofuz
parents:
diff changeset
113 - (long double) RET_LONGDOUBLE
anatofuz
parents:
diff changeset
114 {
anatofuz
parents:
diff changeset
115 return LONGDOUBLE;
anatofuz
parents:
diff changeset
116 }
anatofuz
parents:
diff changeset
117 @end
anatofuz
parents:
diff changeset
118
anatofuz
parents:
diff changeset
119 void *f0(id x) {
anatofuz
parents:
diff changeset
120 Example* pe;
anatofuz
parents:
diff changeset
121 double dd = [pe RET_DOUBLE];
anatofuz
parents:
diff changeset
122 dd = [pe RET_FLOAT];
anatofuz
parents:
diff changeset
123 dd = [pe RET_LONGDOUBLE];
anatofuz
parents:
diff changeset
124
anatofuz
parents:
diff changeset
125 [B im0];
anatofuz
parents:
diff changeset
126 [C im1];
anatofuz
parents:
diff changeset
127 [D alloc];
anatofuz
parents:
diff changeset
128 }
anatofuz
parents:
diff changeset
129