Skip to content

Commit ebb714d

Browse files
committed
IRGen: ObjC method lists are not const.
Put them in __objc_data instead of __objc_const. rdar://problem/66630432
1 parent 2680b0c commit ebb714d

11 files changed

+57
-49
lines changed

lib/IRGen/GenClass.cpp

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ namespace {
12841284
// };
12851285

12861286
assert(fields.getNextOffsetFromGlobal() == size);
1287-
return buildGlobalVariable(fields, "_CATEGORY_");
1287+
return buildGlobalVariable(fields, "_CATEGORY_", /*const*/ true);
12881288
}
12891289

12901290
llvm::Constant *emitProtocol() {
@@ -1336,7 +1336,7 @@ namespace {
13361336
// };
13371337

13381338
assert(fields.getNextOffsetFromGlobal() == size);
1339-
return buildGlobalVariable(fields, "_PROTOCOL_");
1339+
return buildGlobalVariable(fields, "_PROTOCOL_", /*const*/ true);
13401340
}
13411341

13421342
void emitRODataFields(ConstantStructBuilder &b,
@@ -1439,7 +1439,7 @@ namespace {
14391439
emitRODataFields(fields, forMeta, hasUpdater);
14401440

14411441
auto dataSuffix = forMeta ? "_METACLASS_DATA_" : "_DATA_";
1442-
return buildGlobalVariable(fields, dataSuffix);
1442+
return buildGlobalVariable(fields, dataSuffix, /*const*/ true);
14431443
}
14441444

14451445
private:
@@ -1673,7 +1673,8 @@ namespace {
16731673
return null();
16741674
}
16751675

1676-
return buildGlobalVariable(array, "_PROTOCOL_METHOD_TYPES_");
1676+
return buildGlobalVariable(array, "_PROTOCOL_METHOD_TYPES_",
1677+
/*const*/ true);
16771678
}
16781679

16791680
void buildExtMethodTypes(ConstantArrayBuilder &array,
@@ -1698,6 +1699,7 @@ namespace {
16981699
llvm::Constant *buildMethodList(ArrayRef<MethodDescriptor> methods,
16991700
StringRef name) {
17001701
return buildOptionalList(methods, 3 * IGM.getPointerSize(), name,
1702+
/*isConst*/ false,
17011703
[&](ConstantArrayBuilder &descriptors,
17021704
MethodDescriptor descriptor) {
17031705
buildMethod(descriptors, descriptor);
@@ -1723,6 +1725,7 @@ namespace {
17231725
chooseNamePrefix("_PROTOCOLS_",
17241726
"_CATEGORY_PROTOCOLS_",
17251727
"_PROTOCOL_PROTOCOLS_"),
1728+
/*isConst*/ true,
17261729
[&](ConstantArrayBuilder &descriptors,
17271730
ProtocolDecl *protocol) {
17281731
buildProtocol(descriptors, protocol);
@@ -1836,6 +1839,7 @@ namespace {
18361839
llvm::Constant *buildIvarList() {
18371840
Size eltSize = 3 * IGM.getPointerSize() + Size(8);
18381841
return buildOptionalList(Ivars, eltSize, "_IVARS_",
1842+
/*constant*/ true,
18391843
[&](ConstantArrayBuilder &descriptors,
18401844
VarDecl *ivar) {
18411845
buildIvar(descriptors, ivar);
@@ -1971,6 +1975,7 @@ namespace {
19711975
StringRef namePrefix) {
19721976
Size eltSize = 2 * IGM.getPointerSize();
19731977
return buildOptionalList(properties, eltSize, namePrefix,
1978+
/*constant*/ true,
19741979
[&](ConstantArrayBuilder &descriptors,
19751980
VarDecl *property) {
19761981
buildProperty(descriptors, property);
@@ -1989,6 +1994,7 @@ namespace {
19891994
llvm::Constant *buildOptionalList(const C &objects,
19901995
Size optionalEltSize,
19911996
StringRef nameBase,
1997+
bool isConst,
19921998
Fn &&buildElement) {
19931999
if (objects.empty())
19942000
return null();
@@ -2027,7 +2033,7 @@ namespace {
20272033

20282034
fields.fillPlaceholderWithInt(countPosition, countType, count);
20292035

2030-
return buildGlobalVariable(fields, nameBase);
2036+
return buildGlobalVariable(fields, nameBase, isConst);
20312037
}
20322038

20332039
/// Get the name of the class or protocol to mangle into the ObjC symbol
@@ -2047,7 +2053,8 @@ namespace {
20472053
/// Build a private global variable as a structure containing the
20482054
/// given fields.
20492055
template <class B>
2050-
llvm::Constant *buildGlobalVariable(B &fields, StringRef nameBase) {
2056+
llvm::Constant *buildGlobalVariable(B &fields, StringRef nameBase,
2057+
bool isConst) {
20512058
llvm::SmallString<64> nameBuffer;
20522059
auto var =
20532060
fields.finishAndCreateGlobal(Twine(nameBase)
@@ -2061,7 +2068,8 @@ namespace {
20612068

20622069
switch (IGM.TargetInfo.OutputObjectFormat) {
20632070
case llvm::Triple::MachO:
2064-
var->setSection("__DATA, __objc_const");
2071+
var->setSection(isConst ? "__DATA, __objc_const"
2072+
: "__DATA, __objc_data");
20652073
break;
20662074
case llvm::Triple::XCOFF:
20672075
case llvm::Triple::COFF:

test/IRGen/class_update_callback_with_fixed_layout.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ sil_vtable SubclassOfClassWithResilientField {}
5151
// -- the update callback
5252
// CHECK-SAME: @"$s39class_update_callback_with_fixed_layout23ClassWithResilientFieldCMU"
5353

54-
// CHECK-SAME: }, section "__DATA, __objc_const", align 8
54+
// CHECK-SAME: }, section "__DATA, {{.*}}", align 8
5555

5656
// Class has static metadata:
5757
// CHECK-LABEL: @"$s39class_update_callback_with_fixed_layout23ClassWithResilientFieldCMf"

test/IRGen/class_update_callback_without_fixed_layout.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ sil_vtable SubclassOfClassWithResilientField {}
6363
// -- the update callback
6464
// CHECK-NEW-SAME: @"$s42class_update_callback_without_fixed_layout23ClassWithResilientFieldCMU{{(\.ptrauth)?}}"
6565

66-
// CHECK-SAME: }, section "__DATA, __objc_const"
66+
// CHECK-SAME: }, section "__DATA, {{.*}}"
6767

6868
// Class has static metadata:
6969
// CHECK-LABEL: @"$s42class_update_callback_without_fixed_layout23ClassWithResilientFieldCMf"

test/IRGen/objc_bridge.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ import Foundation
9696
// CHECK: i8* bitcast (void ([[OPAQUE:.*]]*, i8*)* @"$s11objc_bridge3BasCfETo" to i8*)
9797
// CHECK: }
9898
// CHECK: ]
99-
// CHECK: }, section "__DATA, __objc_const", align 8
99+
// CHECK: }, section "__DATA, {{.*}}", align 8
100100

101101
// CHECK: @_PROPERTIES__TtC11objc_bridge3Bas = internal constant { i32, i32, [5 x { i8*, i8* }] } {
102102

test/IRGen/objc_class_export.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
// CHECK-SAME: i8* null,
3535
// CHECK-SAME: i8* null,
3636
// CHECK-SAME: i8* null
37-
// CHECK-SAME: }, section "__DATA, __objc_const", align 8
37+
// CHECK-SAME: }, section "__DATA, {{.*}}", align 8
3838
// CHECK: @_DATA__TtC17objc_class_export3Foo = internal constant {{.*\*}} } {
3939
// CHECK-SAME: i32 128,
4040
// CHECK-SAME: i32 16,
@@ -47,7 +47,7 @@
4747
// CHECK-SAME: @_IVARS__TtC17objc_class_export3Foo,
4848
// CHECK-SAME: i8* null,
4949
// CHECK-SAME: _PROPERTIES__TtC17objc_class_export3Foo
50-
// CHECK-SAME: }, section "__DATA, __objc_const", align 8
50+
// CHECK-SAME: }, section "__DATA, {{.*}}", align 8
5151
// CHECK: @"$s17objc_class_export3FooCMf" = internal global <{{.*}} }> <{
5252
// CHECK-SAME: void ([[FOO]]*)* @"$s17objc_class_export3FooCfD",
5353
// CHECK-SAME: i8** @"$sBOWV",

test/IRGen/objc_extensions.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import objc_extension_base
2727
// CHECK-SAME: @"_CATEGORY_CLASS_METHODS_Gizmo_$_objc_extensions",
2828
// CHECK-SAME: @"_CATEGORY_PROTOCOLS_Gizmo_$_objc_extensions",
2929
// CHECK-SAME: i8* null
30-
// CHECK-SAME: }, section "__DATA, __objc_const", align 8
30+
// CHECK-SAME: }, section "__DATA, {{.*}}", align 8
3131

3232
@objc protocol NewProtocol {
3333
func brandNewInstanceMethod()
@@ -67,7 +67,7 @@ extension Gizmo: NewProtocol {
6767
// CHECK: {{.*}} @"_CATEGORY_CLASS_METHODS_Gizmo_$_objc_extensions1",
6868
// CHECK: i8* null,
6969
// CHECK: i8* null
70-
// CHECK: }, section "__DATA, __objc_const", align 8
70+
// CHECK: }, section "__DATA, {{.*}}", align 8
7171

7272
extension Gizmo {
7373
@objc func brandSpankingNewInstanceMethod() {
@@ -92,7 +92,7 @@ class Hoozit : NSObject {
9292
// CHECK: i8* getelementptr inbounds ([8 x i8], [8 x i8]* [[STR:@.*]], i64 0, i64 0),
9393
// CHECK: i8* bitcast (void ([[OPAQUE:%.*]]*, i8*)* @"$s15objc_extensions6HoozitC7blibbleyyFTo" to i8*)
9494
// CHECK: }]
95-
// CHECK: }, section "__DATA, __objc_const", align 8
95+
// CHECK: }, section "__DATA, {{.*}}", align 8
9696

9797
// CHECK-LABEL: @"_CATEGORY_CLASS_METHODS__TtC15objc_extensions6Hoozit_$_objc_extensions" = internal constant
9898
// CHECK: i32 24,
@@ -102,7 +102,7 @@ class Hoozit : NSObject {
102102
// CHECK: i8* getelementptr inbounds ([8 x i8], [8 x i8]* [[STR]], i64 0, i64 0),
103103
// CHECK: i8* bitcast (void (i8*, i8*)* @"$s15objc_extensions6HoozitC7blobbleyyFZTo" to i8*)
104104
// CHECK: }]
105-
// CHECK: }, section "__DATA, __objc_const", align 8
105+
// CHECK: }, section "__DATA, {{.*}}", align 8
106106

107107
// CHECK-LABEL: @"_CATEGORY__TtC15objc_extensions6Hoozit_$_objc_extensions" = internal constant
108108
// CHECK: i8* getelementptr inbounds ([16 x i8], [16 x i8]* [[CATEGORY_NAME]], i64 0, i64 0),
@@ -111,7 +111,7 @@ class Hoozit : NSObject {
111111
// CHECK: {{.*}} @"_CATEGORY_CLASS_METHODS__TtC15objc_extensions6Hoozit_$_objc_extensions",
112112
// CHECK: i8* null,
113113
// CHECK: i8* null
114-
// CHECK: }, section "__DATA, __objc_const", align 8
114+
// CHECK: }, section "__DATA, {{.*}}", align 8
115115

116116
extension Hoozit {
117117
@objc func blibble() { }
@@ -127,7 +127,7 @@ class SwiftOnly { }
127127
// CHECK: i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"\01L_selector_data(wibble)", i64 0, i64 0),
128128
// CHECK: i8* getelementptr inbounds ([8 x i8], [8 x i8]* [[STR]], i64 0, i64 0),
129129
// CHECK: i8* bitcast (void (i8*, i8*)* @"$s15objc_extensions9SwiftOnlyC6wibbleyyFTo" to i8*)
130-
// CHECK: }] }, section "__DATA, __objc_const", align 8
130+
// CHECK: }] }, section "__DATA, {{.*}}", align 8
131131
extension SwiftOnly {
132132
@objc func wibble() { }
133133
}
@@ -157,7 +157,7 @@ extension NSObject {
157157
// CHECK-SAME: i8* getelementptr inbounds ([16 x i8], [16 x i8]* [[CATEGORY_NAME]], i64 0, i64 0),
158158
// CHECK-SAME: @"_CATEGORY_INSTANCE_METHODS__TtCC15objc_extensions5Outer5Inner_$_objc_extensions",
159159
// CHECK-SAME: i8* null
160-
// CHECK-SAME: }, section "__DATA, __objc_const", align 8
160+
// CHECK-SAME: }, section "__DATA, {{.*}}", align 8
161161

162162
class Outer : NSObject {
163163
class Inner : NSObject {}
@@ -175,7 +175,7 @@ class NSDogcow : NSObject {}
175175

176176
// CHECK: [[NAME:@.*]] = private unnamed_addr constant [5 x i8] c"woof\00"
177177
// CHECK: [[ATTR:@.*]] = private unnamed_addr constant [7 x i8] c"Tq,N,D\00"
178-
// CHECK: @"_CATEGORY_PROPERTIES__TtC15objc_extensions8NSDogcow_$_objc_extensions" = internal constant {{.*}} [[NAME]], {{.*}} [[ATTR]], {{.*}}, section "__DATA, __objc_const", align 8
178+
// CHECK: @"_CATEGORY_PROPERTIES__TtC15objc_extensions8NSDogcow_$_objc_extensions" = internal constant {{.*}} [[NAME]], {{.*}} [[ATTR]], {{.*}}, section "__DATA, {{.*}}", align 8
179179
extension NSDogcow {
180180
@NSManaged var woof: Int
181181
}

test/IRGen/objc_methods.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class ObjcDestructible: NSObject {
7979
// CHECK-macosx: i8* bitcast (i8 (i8*, i8*, %4**)* @"$s12objc_methods3FooC4failyyKFTo" to i8*)
8080
// CHECK-ios: i8* bitcast (i1 (i8*, i8*, %4**)* @"$s12objc_methods3FooC4failyyKFTo" to i8*)
8181
// CHECK: }]
82-
// CHECK: }, section "__DATA, __objc_const", align 8
82+
// CHECK: }, section "__DATA, {{.*}}", align 8
8383
// CHECK: @_INSTANCE_METHODS__TtC12objc_methods16ObjcDestructible = internal constant { {{.*}}] } {
8484
// CHECK: i32 24,
8585
// CHECK: i32 2,
@@ -88,7 +88,7 @@ class ObjcDestructible: NSObject {
8888
// CHECK: i8* getelementptr inbounds ([8 x i8], [8 x i8]* [[NO_ARGS_SIGNATURE]], i64 0, i64 0),
8989
// CHECK: i8* bitcast (void (%6*, i8*)* @"$s12objc_methods16ObjcDestructibleCfETo" to i8*) }]
9090
// CHECK: }]
91-
// CHECK: }, section "__DATA, __objc_const", align 8
91+
// CHECK: }, section "__DATA, {{.*}}", align 8
9292
// CHECK: [[BLOCK_SIGNATURE_EXT_1:@.*]] = private unnamed_addr constant [18 x i8] c"v24@0:8@?<q@?q>16\00"
9393
// CHECK: [[BLOCK_SIGNATURE_EXT_2:@.*]] = private unnamed_addr constant [19 x i8] c"v24@0:8@?<q@?qq>16\00"
9494
// CHECK: [[STRING_SIGNATURE_EXT:@.*]] = private unnamed_addr constant [31 x i8] c"@\22NSString\2224@0:8@\22NSString\2216\00"

test/IRGen/objc_properties.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class SomeWrapperTests {
112112
// CHECK-NEW: i8* getelementptr inbounds ([11 x i8], [11 x i8]* [[SHARED_NAME]], i64 0, i64 0),
113113
// CHECK-NEW: i8* getelementptr inbounds ([5 x i8], [5 x i8]* [[SHARED_ATTRS]], i64 0, i64 0)
114114
// CHECK-NEW: }]
115-
// CHECK-NEW: }, section "__DATA, __objc_const", align 8
115+
// CHECK-NEW: }, section "__DATA, {{.*}}", align 8
116116

117117
// CHECK: @_METACLASS_DATA__TtC15objc_properties10SomeObject = internal constant { {{.*}} } {
118118
// CHECK-SAME: i32 {{[0-9]+}}, i32 {{[0-9]+}}, i32 {{[0-9]+}}, i32 {{[0-9]+}},
@@ -122,7 +122,7 @@ class SomeWrapperTests {
122122
// CHECK-SAME: i8* null, i8* null, i8* null,
123123
// CHECK-NEW-SAME: { {{.+}} }* @_CLASS_PROPERTIES__TtC15objc_properties10SomeObject
124124
// CHECK-OLD-SAME: i8* null
125-
// CHECK-SAME: }, section "__DATA, __objc_const", align 8
125+
// CHECK-SAME: }, section "__DATA, {{.*}}", align 8
126126

127127
// CHECK: [[GETTER_SIGNATURE:@.*]] = private unnamed_addr constant [8 x i8] c"@16@0:8\00"
128128
// CHECK: [[SETTER_SIGNATURE:@.*]] = private unnamed_addr constant [11 x i8] c"v24@0:8@16\00"
@@ -163,7 +163,7 @@ class SomeWrapperTests {
163163
// CHECK: i8* getelementptr inbounds ([8 x i8], [8 x i8]* [[GETTER_SIGNATURE]], i64 0, i64 0),
164164
// CHECK: @"$s15objc_properties10SomeObjectCACycfcTo{{(.ptrauth)?}}"
165165
// CHECK: }]
166-
// CHECK: }, section "__DATA, __objc_const", align 8
166+
// CHECK: }, section "__DATA, {{.*}}", align 8
167167

168168
// This appears earlier because it's also used in an ivar description.
169169
// CHECK: [[BAREIVAR_NAME:@.*]] = private unnamed_addr constant [9 x i8] c"bareIvar\00"
@@ -195,7 +195,7 @@ class SomeWrapperTests {
195195
// CHECK: i8* getelementptr inbounds ([7 x i8], [7 x i8]* [[WIBBLE_NAME]], i64 0, i64 0),
196196
// CHECK: i8* getelementptr inbounds ([50 x i8], [50 x i8]* [[WIBBLE_ATTRS]], i64 0, i64 0)
197197
// CHECK: }]
198-
// CHECK: }, section "__DATA, __objc_const", align 8
198+
// CHECK: }, section "__DATA, {{.*}}", align 8
199199

200200
// CHECK: @_DATA__TtC15objc_properties10SomeObject = internal constant { {{.+}} } {
201201
// CHECK: i32 {{[0-9]+}}, i32 {{[0-9]+}}, i32 {{[0-9]+}}, i32 {{[0-9]+}},
@@ -206,7 +206,7 @@ class SomeWrapperTests {
206206
// CHECK: { {{.+}} }* @_IVARS__TtC15objc_properties10SomeObject,
207207
// CHECK: i8* null,
208208
// CHECK: { {{.+}} }* @_PROPERTIES__TtC15objc_properties10SomeObject
209-
// CHECK: }, section "__DATA, __objc_const", align 8
209+
// CHECK: }, section "__DATA, {{.*}}", align 8
210210

211211
// CHECK: @"_CATEGORY_INSTANCE_METHODS__TtC15objc_properties10SomeObject_$_objc_properties" = internal constant { {{.*}}] } {
212212
// CHECK: i32 24,
@@ -220,7 +220,7 @@ class SomeWrapperTests {
220220
// CHECK: i8* getelementptr inbounds ([11 x i8], [11 x i8]* [[SETTER_SIGNATURE]], i64 0, i64 0),
221221
// CHECK: @"$s15objc_properties10SomeObjectC17extensionPropertyACvsTo{{(.ptrauth)?}}"
222222
// CHECK: }]
223-
// CHECK: }, section "__DATA, __objc_const", align 8
223+
// CHECK: }, section "__DATA, {{.*}}", align 8
224224

225225
// CHECK: [[EXTENSIONPROPERTY_NAME:@.*]] = private unnamed_addr constant [18 x i8] c"extensionProperty\00"
226226

@@ -231,7 +231,7 @@ class SomeWrapperTests {
231231
// CHECK: i8* getelementptr inbounds ([18 x i8], [18 x i8]* [[EXTENSIONPROPERTY_NAME]], i64 0, i64 0),
232232
// CHECK: i8* getelementptr inbounds ([42 x i8], [42 x i8]* [[READWRITE_ATTRS]], i64 0, i64 0)
233233
// CHECK: }]
234-
// CHECK: }, section "__DATA, __objc_const", align 8
234+
// CHECK: }, section "__DATA, {{.*}}", align 8
235235

236236
// CHECK-NEW: [[EXTENSIONCLASSPROPERTY_NAME:@.*]] = private unnamed_addr constant [19 x i8] c"extensionClassProp\00"
237237
// CHECK-NEW: [[EXTENSIONCLASSPROPERTY_ATTRS:@.*]] = private unnamed_addr constant [7 x i8] c"T#,N,R\00"
@@ -246,7 +246,7 @@ class SomeWrapperTests {
246246
// CHECK-NEW: }, {
247247
// CHECK-NEW: i8* getelementptr inbounds ([26 x i8], [26 x i8]* [[EXTENSIONSTATICPROPERTY_NAME]], i64 0, i64 0),
248248
// CHECK-NEW: i8* getelementptr inbounds ([5 x i8], [5 x i8]* [[SHARED_ATTRS]], i64 0, i64 0) }]
249-
// CHECK-NEW: }, section "__DATA, __objc_const", align 8
249+
// CHECK-NEW: }, section "__DATA, {{.*}}", align 8
250250

251251
// CHECK: @"_CATEGORY__TtC15objc_properties10SomeObject_$_objc_properties" = internal constant { {{.+}} } {
252252
// CHECK: i8* getelementptr inbounds ([{{.+}} x i8], [{{.+}} x i8]* {{@.+}}, i64 0, i64 0),
@@ -258,7 +258,7 @@ class SomeWrapperTests {
258258
// CHECK-NEW: { {{.+}} }* @"_CATEGORY_CLASS_PROPERTIES__TtC15objc_properties10SomeObject_$_objc_properties",
259259
// CHECK-OLD: i8* null,
260260
// CHECK: i32 60
261-
// CHECK: }, section "__DATA, __objc_const", align 8
261+
// CHECK: }, section "__DATA, {{.*}}", align 8
262262

263263

264264
// CHECK: @_INSTANCE_METHODS__TtC15objc_properties4Tree =
@@ -283,7 +283,7 @@ class SomeWrapperTests {
283283
// CHECK: i8* null,
284284
// CHECK-NEW: { {{.+}} }* @_PROTOCOL_CLASS_PROPERTIES__TtP15objc_properties5Proto_
285285
// CHECK-OLD: i8* null
286-
// CHECK: }, section "__DATA, __objc_const", align 8
286+
// CHECK: }, section "__DATA, {{.*}}", align 8
287287

288288

289289
// CHECK: [[PROTOCOLPROPERTY_NAME:@.+]] = private unnamed_addr constant [6 x i8] c"value\00"
@@ -296,7 +296,7 @@ class SomeWrapperTests {
296296
// CHECK: i8* getelementptr inbounds ([6 x i8], [6 x i8]* [[PROTOCOLPROPERTY_NAME]], i64 0, i64 0),
297297
// CHECK: i8* getelementptr inbounds ([7 x i8], [7 x i8]* [[PROTOCOLPROPERTY_ATTRS]], i64 0, i64 0)
298298
// CHECK: }]
299-
// CHECK: }, section "__DATA, __objc_const", align 8
299+
// CHECK: }, section "__DATA, {{.*}}", align 8
300300

301301
// CHECK-NEW: [[PROTOCOLCLASSPROPERTY_NAME:@.+]] = private unnamed_addr constant [15 x i8] c"sharedInstance\00"
302302
// CHECK-NEW: [[PROTOCOLCLASSPROPERTY_ATTRS:@.+]] = private unnamed_addr constant [7 x i8] c"T@,N,&\00"
@@ -308,4 +308,4 @@ class SomeWrapperTests {
308308
// CHECK-NEW: i8* getelementptr inbounds ([15 x i8], [15 x i8]* [[PROTOCOLCLASSPROPERTY_NAME]], i64 0, i64 0),
309309
// CHECK-NEW: i8* getelementptr inbounds ([7 x i8], [7 x i8]* [[PROTOCOLCLASSPROPERTY_ATTRS]], i64 0, i64 0)
310310
// CHECK-NEW: }]
311-
// CHECK-NEW: }, section "__DATA, __objc_const", align 8
311+
// CHECK-NEW: }, section "__DATA, {{.*}}", align 8

0 commit comments

Comments
 (0)