Skip to content

Commit e67e5c1

Browse files
Merge pull request #40484 from aschwaighofer/rdar86256970
Revert "Merge pull request #40342 from aschwaighofer/make_objc_metadata_weak_hidden"
2 parents 75ade66 + fab112f commit e67e5c1

17 files changed

+58
-59
lines changed

lib/IRGen/GenClass.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,8 +1343,7 @@ namespace {
13431343
// };
13441344

13451345
assert(fields.getNextOffsetFromGlobal() == size);
1346-
return buildGlobalVariable(fields, "_CATEGORY_", /*const*/ true,
1347-
llvm::GlobalVariable::InternalLinkage);
1346+
return buildGlobalVariable(fields, "_CATEGORY_", /*const*/ true);
13481347
}
13491348

13501349
llvm::Constant *emitProtocol() {
@@ -1504,8 +1503,7 @@ namespace {
15041503
// statically. Otherwise, the ObjC runtime may slide the InstanceSize
15051504
// based on changing base class layout.
15061505
return buildGlobalVariable(fields, dataSuffix,
1507-
/*const*/ forMeta || FieldLayout->isFixedSize(),
1508-
llvm::GlobalVariable::InternalLinkage);
1506+
/*const*/ forMeta || FieldLayout->isFixedSize());
15091507
}
15101508

15111509
private:
@@ -1770,8 +1768,12 @@ namespace {
17701768
return null();
17711769
}
17721770

1773-
return buildGlobalVariable(array, "_PROTOCOL_METHOD_TYPES_",
1774-
/*const*/ true);
1771+
auto *gv_as_const = buildGlobalVariable(array, "_PROTOCOL_METHOD_TYPES_",
1772+
/*const*/ true,
1773+
/*likage*/ llvm::GlobalVariable::WeakAnyLinkage);
1774+
llvm::GlobalValue *gv = (llvm::GlobalValue *)gv_as_const;
1775+
gv->setVisibility(llvm::GlobalValue::HiddenVisibility);
1776+
return gv;
17751777
}
17761778

17771779
void buildExtMethodTypes(ConstantArrayBuilder &array,
@@ -2173,7 +2175,7 @@ namespace {
21732175
template <class B>
21742176
llvm::Constant *buildGlobalVariable(B &fields, StringRef nameBase, bool isConst,
21752177
llvm::GlobalValue::LinkageTypes linkage =
2176-
llvm::GlobalVariable::WeakAnyLinkage) {
2178+
llvm::GlobalVariable::InternalLinkage) {
21772179
llvm::SmallString<64> nameBuffer;
21782180
auto var =
21792181
fields.finishAndCreateGlobal(Twine(nameBase)
@@ -2184,9 +2186,6 @@ namespace {
21842186
IGM.getPointerAlignment(),
21852187
/*constant*/ true,
21862188
linkage);
2187-
if (linkage == llvm::GlobalVariable::WeakAnyLinkage) {
2188-
var->setVisibility(llvm::GlobalValue::HiddenVisibility);
2189-
}
21902189

21912190
switch (IGM.TargetInfo.OutputObjectFormat) {
21922191
case llvm::Triple::MachO:

test/Concurrency/objc_async_protocol_irgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let anyObject: AnyObject = (MyAsyncProtocol.self as AnyObject) // or something l
99
// Make sure we don't emit 2 copies of methods, due to a completion-handler
1010
// version and another due to an async based version.
1111

12-
// CHECK-LABEL: @_PROTOCOL_INSTANCE_METHODS_MyAsyncProtocol = weak hidden constant
12+
// CHECK-LABEL: @_PROTOCOL_INSTANCE_METHODS_MyAsyncProtocol = internal constant
1313
// CHECK-SAME: selector_data(myAsyncMethod:)
1414
// CHECK-NOT: selector_data(myAsyncMethod:)
1515
// CHECK-SAME: align [[ALIGNMENT]]

test/IRGen/generic_casts.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ import Foundation
88
import gizmo
99

1010
// -- Protocol records for cast-to ObjC protocols
11-
// CHECK: @_PROTOCOL__TtP13generic_casts10ObjCProto1_ = weak hidden constant
11+
// CHECK: @_PROTOCOL__TtP13generic_casts10ObjCProto1_ = internal constant
1212
// CHECK: @"\01l_OBJC_LABEL_PROTOCOL_$__TtP13generic_casts10ObjCProto1_" = weak hidden global i8* bitcast ({{.*}} @_PROTOCOL__TtP13generic_casts10ObjCProto1_ to i8*), section {{"__DATA,__objc_protolist,coalesced,no_dead_strip"|"objc_protolist"|".objc_protolist\$B"}}
1313
// CHECK: @"\01l_OBJC_PROTOCOL_REFERENCE_$__TtP13generic_casts10ObjCProto1_" = weak hidden global i8* bitcast ({{.*}} @_PROTOCOL__TtP13generic_casts10ObjCProto1_ to i8*), section {{"__DATA,__objc_protorefs,coalesced,no_dead_strip"|"objc_protorefs"|".objc_protorefs\$B"}}
1414

15-
// CHECK: @_PROTOCOL_NSRuncing = weak hidden constant
15+
// CHECK: @_PROTOCOL_NSRuncing = internal constant
1616
// CHECK: @"\01l_OBJC_LABEL_PROTOCOL_$_NSRuncing" = weak hidden global i8* bitcast ({{.*}} @_PROTOCOL_NSRuncing to i8*), section {{"__DATA,__objc_protolist,coalesced,no_dead_strip"|"objc_protolist"|".objc_protolist\$B"}}
1717
// CHECK: @"\01l_OBJC_PROTOCOL_REFERENCE_$_NSRuncing" = weak hidden global i8* bitcast ({{.*}} @_PROTOCOL_NSRuncing to i8*), section {{"__DATA,__objc_protorefs,coalesced,no_dead_strip"|"objc_protorefs"|".objc_protorefs\$B"}}
1818

19-
// CHECK: @_PROTOCOLS__TtC13generic_casts10ObjCClass2 = weak hidden constant { i64, [1 x i8*] } {
19+
// CHECK: @_PROTOCOLS__TtC13generic_casts10ObjCClass2 = internal constant { i64, [1 x i8*] } {
2020
// CHECK: i64 1,
2121
// CHECK: @_PROTOCOL__TtP13generic_casts10ObjCProto2_
2222
// CHECK: }
2323

2424
// CHECK: @_DATA__TtC13generic_casts10ObjCClass2 = internal constant {{.*}} @_PROTOCOLS__TtC13generic_casts10ObjCClass2
2525

26-
// CHECK: @_PROTOCOL_PROTOCOLS__TtP13generic_casts10ObjCProto2_ = weak hidden constant { i64, [1 x i8*] } {
26+
// CHECK: @_PROTOCOL_PROTOCOLS__TtP13generic_casts10ObjCProto2_ = internal constant { i64, [1 x i8*] } {
2727
// CHECK: i64 1,
2828
// CHECK: @_PROTOCOL__TtP13generic_casts10ObjCProto1_
2929
// CHECK: }

test/IRGen/objc_async_metadata.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Foundation
1212
// CHECK: [[ENCODE_ASYNC_STRING:@.*]] = private unnamed_addr constant [28 x i8] c"v24@0:8@?<v@?@\22NSString\22>16\00"
1313
// CHECK: [[ENCODE_ASYNC_THROWS_STRING:@.*]] = private unnamed_addr constant [38 x i8] c"v24@0:8@?<v@?@\22NSString\22@\22NSError\22>16\00"
1414

15-
// CHECK: @_INSTANCE_METHODS__TtC19objc_async_metadata7MyClass = weak hidden constant
15+
// CHECK: @_INSTANCE_METHODS__TtC19objc_async_metadata7MyClass = internal constant
1616
// CHECK-SAME: methodWithCompletionHandler:
1717
// CHECK-SAME: [[ENCODE_ASYNC_STRING]]
1818
// CHECK-SAME: throwingMethodWithCompletionHandler:
@@ -23,7 +23,7 @@ class MyClass: NSObject {
2323
}
2424

2525
// CHECK: [[ENCODE_ASYNC_STRING_PROTO:@.*]] = private unnamed_addr constant [15 x i8] c"v32@0:8@16@?24\00"
26-
// CHECK-LABEL: @_PROTOCOL_INSTANCE_METHODS__TtP19objc_async_metadata7MyProto_ = weak hidden constant
26+
// CHECK-LABEL: @_PROTOCOL_INSTANCE_METHODS__TtP19objc_async_metadata7MyProto_ = internal constant
2727
// CHECK-SAME: _selector_data(myProtoRequirement:completionHandler:)
2828
// CHECK-SAME: [15 x i8]* [[ENCODE_ASYNC_STRING_PROTO]]
2929

test/IRGen/objc_attr_NSManaged.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ import Foundation
1717
sil_vtable X {}
1818

1919
// The getter/setter should not show up in the Objective-C metadata.
20-
// CHECK: @_INSTANCE_METHODS__TtC19objc_attr_NSManaged10SwiftGizmo = weak hidden constant { i32, i32, [2 x { i8*, i8*, i8* }] } { i32 24, i32 2, {{.*}} @"\01L_selector_data(initWithBellsOn:)", {{.*}} @"\01L_selector_data(init)",
20+
// CHECK: @_INSTANCE_METHODS__TtC19objc_attr_NSManaged10SwiftGizmo = internal constant { i32, i32, [2 x { i8*, i8*, i8* }] } { i32 24, i32 2, {{.*}} @"\01L_selector_data(initWithBellsOn:)", {{.*}} @"\01L_selector_data(init)",
2121

2222
// CHECK: [[X:@[0-9]+]] = private unnamed_addr constant [2 x i8] c"x\00"
2323

2424
// The property 'x' should show up in the Objective-C metadata.
25-
// CHECK: @_PROPERTIES__TtC19objc_attr_NSManaged10SwiftGizmo = weak hidden constant { {{.*}}i32, i32, [1 x { i8*, i8* }] } { i32 16, i32 1, [1 x { i8*, i8* }] [{ i8*, i8* } { i8* getelementptr inbounds ([2 x i8], [2 x i8]* [[X]], i64 0, i64 0),
25+
// CHECK: @_PROPERTIES__TtC19objc_attr_NSManaged10SwiftGizmo = internal constant { {{.*}}i32, i32, [1 x { i8*, i8* }] } { i32 16, i32 1, [1 x { i8*, i8* }] [{ i8*, i8* } { i8* getelementptr inbounds ([2 x i8], [2 x i8]* [[X]], i64 0, i64 0),
2626

2727
// The getter/setter should not show up in the Swift metadata.
2828
// CHECK: @"$s19objc_attr_NSManaged10SwiftGizmoCMf" = internal global <{ {{.*}} }> <{ void (%T19objc_attr_NSManaged10SwiftGizmoC*)* {{.*}}@"$s19objc_attr_NSManaged10SwiftGizmoCfD{{(\.ptrauth)?}}"{{.*}}, i8**{{.*}} @"$sBOWV{{(.ptrauth)?(.)?[0-9]?}}"{{.*}}, {{.*}} @"OBJC_METACLASS_$__TtC19objc_attr_NSManaged10SwiftGizmo{{(.ptrauth)?}}"{{.*}}, %objc_class*{{.*}} @"OBJC_CLASS_$_Gizmo{{(.ptrauth)?}}"{{.*}}, %swift.opaque* @_objc_empty_cache, %swift.opaque* null,{{.*}}@_DATA__TtC19objc_attr_NSManaged10SwiftGizmo{{.*}}i64 {{1|2}}){{.*}}, i32 {{1|0}}, i32 0, i32 8, i16 7, i16 0, i32 96, i32 16, {{.*}}* @"$s19objc_attr_NSManaged10SwiftGizmoCMn{{(\.ptrauth)?}}"{{.*}}, i8* null }>

test/IRGen/objc_bridge.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
// CHECK: [[SETTER_SIGNATURE:@.*]] = private unnamed_addr constant [11 x i8] c"v24@0:8@16\00"
1212
// CHECK: [[DEALLOC_SIGNATURE:@.*]] = private unnamed_addr constant [8 x i8] c"v16@0:8\00"
1313

14-
// CHECK: @_INSTANCE_METHODS__TtC11objc_bridge3Bas = weak hidden constant { i32, i32, [17 x { i8*, i8*, i8* }] } {
14+
// CHECK: @_INSTANCE_METHODS__TtC11objc_bridge3Bas = internal constant { i32, i32, [17 x { i8*, i8*, i8* }] } {
1515
// CHECK: i32 24,
1616
// CHECK: i32 17,
1717
// CHECK: [17 x { i8*, i8*, i8* }] [
@@ -114,10 +114,10 @@ import Foundation
114114
// CHECK: ]
115115
// CHECK: }, section "__DATA, {{.*}}", align 8
116116

117-
// CHECK: @_PROPERTIES__TtC11objc_bridge3Bas = weak hidden constant { i32, i32, [5 x { i8*, i8* }] } {
117+
// CHECK: @_PROPERTIES__TtC11objc_bridge3Bas = internal constant { i32, i32, [5 x { i8*, i8* }] } {
118118

119119
// CHECK: [[OBJC_BLOCK_PROPERTY:@.*]] = private unnamed_addr constant [8 x i8] c"T@?,N,C\00"
120-
// CHECK: @_PROPERTIES__TtC11objc_bridge21OptionalBlockProperty = weak hidden constant {{.*}} [[OBJC_BLOCK_PROPERTY]]
120+
// CHECK: @_PROPERTIES__TtC11objc_bridge21OptionalBlockProperty = internal constant {{.*}} [[OBJC_BLOCK_PROPERTY]]
121121

122122
func getDescription(_ o: NSObject) -> String {
123123
return o.description

test/IRGen/objc_class_property.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
// class properties, so no ObjC property is reflected.
77

88
// CHECK-NOT: @_PROPERTIES__TtC19objc_class_property7Smashed
9-
// CHECK: @_CLASS_METHODS__TtC19objc_class_property7Smashed = weak hidden constant { i32, i32, [1 x { i8*, i8*, i8* }] } {
9+
// CHECK: @_CLASS_METHODS__TtC19objc_class_property7Smashed = internal constant { i32, i32, [1 x { i8*, i8*, i8* }] } {
1010
// CHECK: i8* getelementptr inbounds ([14 x i8], [14 x i8]* @"\01L_selector_data(sharedSmashed)"
1111
// CHECK-NOT: @_PROPERTIES__TtC19objc_class_property7Smashed
12-
// CHECK: @_INSTANCE_METHODS__TtC19objc_class_property7Smashed = weak hidden constant { i32, i32, [1 x { i8*, i8*, i8* }] } {
12+
// CHECK: @_INSTANCE_METHODS__TtC19objc_class_property7Smashed = internal constant { i32, i32, [1 x { i8*, i8*, i8* }] } {
1313
// CHECK: i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01L_selector_data(init)"
1414
// CHECK-NOT: @_PROPERTIES__TtC19objc_class_property7Smashed
1515

test/IRGen/objc_extensions.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import objc_extension_base
1616
// CHECK: [[CATEGORY_NAME:@.*]] = private constant [16 x i8] c"objc_extensions\00"
1717
// CHECK: [[METHOD_TYPE:@.*]] = private unnamed_addr constant [8 x i8] c"v16@0:8\00"
1818

19-
// CHECK-LABEL: @"_CATEGORY_PROTOCOLS_Gizmo_$_objc_extensions" = weak hidden constant
19+
// CHECK-LABEL: @"_CATEGORY_PROTOCOLS_Gizmo_$_objc_extensions" = internal constant
2020
// CHECK-SAME: i64 1,
2121
// CHECK-SAME: @_PROTOCOL__TtP15objc_extensions11NewProtocol_
2222

@@ -84,7 +84,7 @@ extension Gizmo {
8484
class Hoozit : NSObject {
8585
}
8686

87-
// CHECK-LABEL: @"_CATEGORY_INSTANCE_METHODS__TtC15objc_extensions6Hoozit_$_objc_extensions" = weak hidden constant
87+
// CHECK-LABEL: @"_CATEGORY_INSTANCE_METHODS__TtC15objc_extensions6Hoozit_$_objc_extensions" = internal constant
8888
// CHECK: i32 24,
8989
// CHECK: i32 1,
9090
// CHECK: [1 x { i8*, i8*, i8* }] [{ i8*, i8*, i8* } {
@@ -94,7 +94,7 @@ class Hoozit : NSObject {
9494
// CHECK: }]
9595
// CHECK: }, section "__DATA, {{.*}}", align 8
9696

97-
// CHECK-LABEL: @"_CATEGORY_CLASS_METHODS__TtC15objc_extensions6Hoozit_$_objc_extensions" = weak hidden constant
97+
// CHECK-LABEL: @"_CATEGORY_CLASS_METHODS__TtC15objc_extensions6Hoozit_$_objc_extensions" = internal constant
9898
// CHECK: i32 24,
9999
// CHECK: i32 1,
100100
// CHECK: [1 x { i8*, i8*, i8* }] [{ i8*, i8*, i8* } {
@@ -120,7 +120,7 @@ extension Hoozit {
120120

121121
class SwiftOnly { }
122122

123-
// CHECK-LABEL: @"_CATEGORY_INSTANCE_METHODS__TtC15objc_extensions9SwiftOnly_$_objc_extensions" = weak hidden constant
123+
// CHECK-LABEL: @"_CATEGORY_INSTANCE_METHODS__TtC15objc_extensions9SwiftOnly_$_objc_extensions" = internal constant
124124
// CHECK: i32 24,
125125
// CHECK: i32 1,
126126
// CHECK: [1 x { i8*, i8*, i8* }] [{ i8*, i8*, i8* } {
@@ -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" = weak hidden constant {{.*}} [[NAME]], {{.*}} [[ATTR]], {{.*}}, section "__DATA, {{.*}}", 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_int_encoding.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// CHECK-64: [[INT_UINT_METHOD_ENCODING:@.*]] = private unnamed_addr constant {{.*}} c"Q24@0:8q16\00"
66
// CHECK-32: [[INT_UINT_METHOD_ENCODING:@.*]] = private unnamed_addr constant {{.*}} c"I12@0:4i8\00"
77

8-
// CHECK: @_INSTANCE_METHODS__TtC17objc_int_encoding3Foo = weak hidden constant {{.*}} [[SELECTOR]], {{.*}} [[INT_UINT_METHOD_ENCODING]], {{.*}} @"$s17objc_int_encoding3FooC3foo1xSuSi_tFTo{{(\.ptrauth)?}}"
8+
// CHECK: @_INSTANCE_METHODS__TtC17objc_int_encoding3Foo = internal constant {{.*}} [[SELECTOR]], {{.*}} [[INT_UINT_METHOD_ENCODING]], {{.*}} @"$s17objc_int_encoding3FooC3foo1xSuSi_tFTo{{(\.ptrauth)?}}"
99

1010
sil_stage canonical
1111

test/IRGen/objc_methods.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ObjcDestructible: NSObject {
5454
// CHECK-ios: [[FAIL_SIGNATURE:@.*]] = private unnamed_addr constant [12 x i8] c"B24@0:8^@16\00"
5555
// CHECK-tvos: [[FAIL_SIGNATURE:@.*]] = private unnamed_addr constant [12 x i8] c"B24@0:8^@16\00"
5656
// CHECK-watchos: [[FAIL_SIGNATURE:@.*]] = private unnamed_addr constant [12 x i8] c"B24@0:8^@16\00"
57-
// CHECK: @_INSTANCE_METHODS__TtC12objc_methods3Foo = weak hidden constant { {{.*}}] } {
57+
// CHECK: @_INSTANCE_METHODS__TtC12objc_methods3Foo = internal constant { {{.*}}] } {
5858
// CHECK: i32 24,
5959
// CHECK: i32 10,
6060
// CHECK: [10 x { i8*, i8*, i8* }] [{
@@ -84,7 +84,7 @@ class ObjcDestructible: NSObject {
8484
// CHECK-ios: i8* bitcast (i1 (i8*, i8*, %4**)* @"$s12objc_methods3FooC4failyyKFTo" to i8*)
8585
// CHECK: }]
8686
// CHECK: }, section "__DATA, {{.*}}", align 8
87-
// CHECK: @_INSTANCE_METHODS__TtC12objc_methods16ObjcDestructible = weak hidden constant { {{.*}}] } {
87+
// CHECK: @_INSTANCE_METHODS__TtC12objc_methods16ObjcDestructible = internal constant { {{.*}}] } {
8888
// CHECK: i32 24,
8989
// CHECK: i32 2,
9090
// CHECK: [2 x { i8*, i8*, i8* }] [{

test/IRGen/objc_properties.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class SomeWrapperTests {
105105
// CHECK-NEW: [[SHARED_NAME:@.*]] = private unnamed_addr constant [11 x i8] c"sharedProp\00"
106106
// CHECK-NEW: [[SHARED_ATTRS:@.*]] = private unnamed_addr constant [5 x i8] c"Tq,N\00"
107107

108-
// CHECK-NEW: @_CLASS_PROPERTIES__TtC15objc_properties10SomeObject = weak hidden constant { {{.*}}] } {
108+
// CHECK-NEW: @_CLASS_PROPERTIES__TtC15objc_properties10SomeObject = internal constant { {{.*}}] } {
109109
// CHECK-NEW: i32 16,
110110
// CHECK-NEW: i32 1,
111111
// CHECK-NEW: [1 x { i8*, i8* }] [{
@@ -127,7 +127,7 @@ class SomeWrapperTests {
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"
129129

130-
// CHECK: @_INSTANCE_METHODS__TtC15objc_properties10SomeObject = weak hidden constant { {{.*}}] } {
130+
// CHECK: @_INSTANCE_METHODS__TtC15objc_properties10SomeObject = internal constant { {{.*}}] } {
131131
// CHECK: i32 24,
132132
// CHECK: i32 8,
133133
// CHECK: [8 x { i8*, i8*, i8* }] [{
@@ -179,7 +179,7 @@ class SomeWrapperTests {
179179
// CHECK: [[WIBBLE_NAME:@.*]] = private unnamed_addr constant [7 x i8] c"wobble\00"
180180
// CHECK: [[WIBBLE_ATTRS:@.*]] = private unnamed_addr constant [50 x i8] c"T@\22_TtC15objc_properties10SomeObject\22,N,&,Vwibble\00"
181181

182-
// CHECK: @_PROPERTIES__TtC15objc_properties10SomeObject = weak hidden constant { {{.*}}] } {
182+
// CHECK: @_PROPERTIES__TtC15objc_properties10SomeObject = internal constant { {{.*}}] } {
183183
// CHECK: i32 16,
184184
// CHECK: i32 4,
185185
// CHECK: [4 x { i8*, i8* }] [{
@@ -208,7 +208,7 @@ class SomeWrapperTests {
208208
// CHECK: { {{.+}} }* @_PROPERTIES__TtC15objc_properties10SomeObject
209209
// CHECK: }, section "__DATA, {{.*}}", align 8
210210

211-
// CHECK: @"_CATEGORY_INSTANCE_METHODS__TtC15objc_properties10SomeObject_$_objc_properties" = weak hidden constant { {{.*}}] } {
211+
// CHECK: @"_CATEGORY_INSTANCE_METHODS__TtC15objc_properties10SomeObject_$_objc_properties" = internal constant { {{.*}}] } {
212212
// CHECK: i32 24,
213213
// CHECK: i32 2,
214214
// CHECK: [2 x { i8*, i8*, i8* }] [{
@@ -224,7 +224,7 @@ class SomeWrapperTests {
224224

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

227-
// CHECK: @"_CATEGORY_PROPERTIES__TtC15objc_properties10SomeObject_$_objc_properties" = weak hidden constant { {{.*}}] } {
227+
// CHECK: @"_CATEGORY_PROPERTIES__TtC15objc_properties10SomeObject_$_objc_properties" = internal constant { {{.*}}] } {
228228
// CHECK: i32 16,
229229
// CHECK: i32 1,
230230
// CHECK: [1 x { i8*, i8* }] [{
@@ -237,7 +237,7 @@ class SomeWrapperTests {
237237
// CHECK-NEW: [[EXTENSIONCLASSPROPERTY_ATTRS:@.*]] = private unnamed_addr constant [7 x i8] c"T#,N,R\00"
238238
// CHECK-NEW: [[EXTENSIONSTATICPROPERTY_NAME:@.*]] = private unnamed_addr constant [26 x i8] c"extensionStoredStaticProp\00"
239239

240-
// CHECK-NEW: @"_CATEGORY_CLASS_PROPERTIES__TtC15objc_properties10SomeObject_$_objc_properties" = weak hidden constant { {{.*}}] } {
240+
// CHECK-NEW: @"_CATEGORY_CLASS_PROPERTIES__TtC15objc_properties10SomeObject_$_objc_properties" = internal constant { {{.*}}] } {
241241
// CHECK-NEW: i32 16,
242242
// CHECK-NEW: i32 2,
243243
// CHECK-NEW: [2 x { i8*, i8* }] [{
@@ -269,7 +269,7 @@ class SomeWrapperTests {
269269
// CHECK: i8* getelementptr inbounds ([11 x i8], [11 x i8]* [[SETTER_SIGNATURE]], i64 0, i64 0),
270270
// CHECK: @"$s15objc_properties4TreeC6parentACSgvsTo{{(.ptrauth)?}}"
271271

272-
// CHECK: @_PROTOCOL__TtP15objc_properties5Proto_ = weak hidden constant { {{.+}} } {
272+
// CHECK: @_PROTOCOL__TtP15objc_properties5Proto_ = internal constant { {{.+}} } {
273273
// CHECK: i8* null,
274274
// CHECK: i8* getelementptr inbounds ([{{.+}} x i8], [{{.+}} x i8]* {{@.+}}, i64 0, i64 0),
275275
// CHECK: i8* null,
@@ -289,7 +289,7 @@ class SomeWrapperTests {
289289
// CHECK: [[PROTOCOLPROPERTY_NAME:@.+]] = private unnamed_addr constant [6 x i8] c"value\00"
290290
// CHECK: [[PROTOCOLPROPERTY_ATTRS:@.+]] = private unnamed_addr constant [7 x i8] c"Tq,N,R\00"
291291

292-
// CHECK: @_PROTOCOL_PROPERTIES__TtP15objc_properties5Proto_ = weak hidden constant { {{.*}}] } {
292+
// CHECK: @_PROTOCOL_PROPERTIES__TtP15objc_properties5Proto_ = internal constant { {{.*}}] } {
293293
// CHECK: i32 16,
294294
// CHECK: i32 1,
295295
// CHECK: [1 x { i8*, i8* }] [{
@@ -301,7 +301,7 @@ class SomeWrapperTests {
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"
303303

304-
// CHECK-NEW: @_PROTOCOL_CLASS_PROPERTIES__TtP15objc_properties5Proto_ = weak hidden constant { {{.*}}] } {
304+
// CHECK-NEW: @_PROTOCOL_CLASS_PROPERTIES__TtP15objc_properties5Proto_ = internal constant { {{.*}}] } {
305305
// CHECK-NEW: i32 16,
306306
// CHECK-NEW: i32 1,
307307
// CHECK-NEW: [1 x { i8*, i8* }] [{

0 commit comments

Comments
 (0)