Skip to content

Commit 9a3a92b

Browse files
authored
IRGen: Give ObjC metadata symbols internal linkage. (#33193)
This preserves the symbol names in (unstripped) binaries, so we can use them for link ordering and memory usage analysis.
1 parent 9b9f6dc commit 9a3a92b

25 files changed

+82
-82
lines changed

lib/IRGen/GenClass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2020,7 +2020,7 @@ namespace {
20202020
: Twine()),
20212021
IGM.getPointerAlignment(),
20222022
/*constant*/ true,
2023-
llvm::GlobalVariable::PrivateLinkage);
2023+
llvm::GlobalVariable::InternalLinkage);
20242024

20252025
switch (IGM.TargetInfo.OutputObjectFormat) {
20262026
case llvm::Triple::MachO:

test/IRGen/class.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ sil_vtable C {}
1818
// <rdar://14812566>: include _Tt prefix here
1919
// CHECK: [[C_NAME:@.*]] = private unnamed_addr constant [13 x i8] c"_TtC5class1C\00"
2020

21-
// CHECK: @_DATA__TtC5class1C = private constant {{.*}} {
21+
// CHECK: @_DATA__TtC5class1C = internal constant {{.*}} {
2222
// CHECK-SAME: i32 128,
2323
// CHECK-SAME: i32 16,
2424
// CHECK-SAME: i32 16,

test/IRGen/class_update_callback_with_fixed_layout.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ sil_vtable SubclassOfClassWithResilientField {}
4343

4444

4545
// RO-data for ClassWithResilientField:
46-
// CHECK-LABEL: @_DATA__TtC39class_update_callback_with_fixed_layout23ClassWithResilientField = private constant {
46+
// CHECK-LABEL: @_DATA__TtC39class_update_callback_with_fixed_layout23ClassWithResilientField = internal constant {
4747

4848
// -- flags: compiled with ARC, has update callback
4949
// CHECK-SAME: i32 192,

test/IRGen/class_update_callback_with_stub.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,18 @@ import resilient_objc_class
8383

8484
// -- Categories reference the stubs
8585

86-
// CHECK-LABEL: @"_CATEGORY__TtC31class_update_callback_with_stub17ResilientSubclass_$_class_update_callback_with_stub" = private constant
86+
// CHECK-LABEL: @"_CATEGORY__TtC31class_update_callback_with_stub17ResilientSubclass_$_class_update_callback_with_stub" = internal constant
8787
// CHECK-SAME: @"$s31class_update_callback_with_stub17ResilientSubclassCMs"
8888

89-
// CHECK-LABEL: @"_CATEGORY__TtC31class_update_callback_with_stub25ResilientNSObjectSubclass_$_class_update_callback_with_stub" = private constant
89+
// CHECK-LABEL: @"_CATEGORY__TtC31class_update_callback_with_stub25ResilientNSObjectSubclass_$_class_update_callback_with_stub" = internal constant
9090
// CHECK-SAME: @"$s31class_update_callback_with_stub25ResilientNSObjectSubclassCMs"
9191

92-
// CHECK-LABEL: @"_CATEGORY__TtC31class_update_callback_with_stub27FixedLayoutNSObjectSubclass_$_class_update_callback_with_stub" = private constant
92+
// CHECK-LABEL: @"_CATEGORY__TtC31class_update_callback_with_stub27FixedLayoutNSObjectSubclass_$_class_update_callback_with_stub" = internal constant
9393
// CHECK-SAME: @"$s31class_update_callback_with_stub27FixedLayoutNSObjectSubclassCMs"
9494

9595
// -- But not if the entire inheritance chain is in a single module
9696

97-
// CHECK-LABEL: @"_CATEGORY__TtC15resilient_class22ResilientOutsideParent_$_class_update_callback_with_stub" = private constant
97+
// CHECK-LABEL: @"_CATEGORY__TtC15resilient_class22ResilientOutsideParent_$_class_update_callback_with_stub" = internal constant
9898
// CHECK-SAME: @"$s15resilient_class22ResilientOutsideParentCN"
9999

100100

test/IRGen/class_update_callback_without_fixed_layout.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ sil_vtable SubclassOfClassWithResilientField {}
5252

5353

5454
// RO-data for ClassWithResilientField:
55-
// CHECK-LABEL: @_DATA__TtC42class_update_callback_without_fixed_layout23ClassWithResilientField = private constant {
55+
// CHECK-LABEL: @_DATA__TtC42class_update_callback_without_fixed_layout23ClassWithResilientField = internal constant {
5656

5757
// -- flags: compiled with ARC
5858
// CHECK-OLD-SAME: i32 128,

test/IRGen/generic_casts.swift

Lines changed: 5 additions & 5 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_ = private 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 = private 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 = private 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

24-
// CHECK: @_DATA__TtC13generic_casts10ObjCClass2 = private constant {{.*}} @_PROTOCOLS__TtC13generic_casts10ObjCClass2
24+
// CHECK: @_DATA__TtC13generic_casts10ObjCClass2 = internal constant {{.*}} @_PROTOCOLS__TtC13generic_casts10ObjCClass2
2525

26-
// CHECK: @_PROTOCOL_PROTOCOLS__TtP13generic_casts10ObjCProto2_ = private 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/metadata.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ enum Singleton {
1010

1111
// CHECK: @"$s1A1GC14zeroSizedFieldAA9SingletonOvpWvd" = hidden constant i{{(64|32)}} 0
1212
// Check that the instance start is after the header (at 8 or 16).
13-
// CHECK-macosx: _DATA__TtC1A1G = private constant {{.*}} { i32 {{(128|129)}}, i32 {{(16|8|40)}}
14-
// CHECK-ios: _DATA__TtC1A1G = private constant {{.*}} { i32 {{(128|129)}}, i32 {{(16|8|40)}}
15-
// CHECK-watchos: _DATA__TtC1A1G = private constant {{.*}} { i32 128, i32 {{(16|8)}}
16-
// CHECK-tvos: _DATA__TtC1A1G = private constant {{.*}} { i32 128, i32 {{(16|8)}}
13+
// CHECK-macosx: _DATA__TtC1A1G = internal constant {{.*}} { i32 {{(128|129)}}, i32 {{(16|8|40)}}
14+
// CHECK-ios: _DATA__TtC1A1G = internal constant {{.*}} { i32 {{(128|129)}}, i32 {{(16|8|40)}}
15+
// CHECK-watchos: _DATA__TtC1A1G = internal constant {{.*}} { i32 128, i32 {{(16|8)}}
16+
// CHECK-tvos: _DATA__TtC1A1G = internal constant {{.*}} { i32 128, i32 {{(16|8)}}
1717

1818
class G {
1919
var zeroSizedField = Singleton.only

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 = private 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 = private 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", i8** @"$sBOWV", i64 ptrtoint (%objc_class* @"OBJC_METACLASS_$__TtC19objc_attr_NSManaged10SwiftGizmo" to i64), %objc_class* @"OBJC_CLASS_$_Gizmo", %swift.opaque* @_objc_empty_cache, %swift.opaque* null, i64 add (i64 ptrtoint ({ i32, i32, i32, i32, i8*, i8*, { i32, i32, [2 x { i8*, i8*, i8* }] }*, i8*, i8*, i8*, { i32, i32, [1 x { i8*, i8* }] }* }* @_DATA__TtC19objc_attr_NSManaged10SwiftGizmo to i64), i64 {{1|2}}), i32 {{1|0}}, i32 0, i32 8, i16 7, i16 0, i32 96, i32 16, {{.*}}* @"$s19objc_attr_NSManaged10SwiftGizmoCMn", 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 = private 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* }] [
@@ -98,10 +98,10 @@ import Foundation
9898
// CHECK: ]
9999
// CHECK: }, section "__DATA, __objc_const", align 8
100100

101-
// CHECK: @_PROPERTIES__TtC11objc_bridge3Bas = private constant { i32, i32, [5 x { i8*, i8* }] } {
101+
// CHECK: @_PROPERTIES__TtC11objc_bridge3Bas = internal constant { i32, i32, [5 x { i8*, i8* }] } {
102102

103103
// CHECK: [[OBJC_BLOCK_PROPERTY:@.*]] = private unnamed_addr constant [8 x i8] c"T@?,N,C\00"
104-
// CHECK: @_PROPERTIES__TtC11objc_bridge21OptionalBlockProperty = private constant {{.*}} [[OBJC_BLOCK_PROPERTY]]
104+
// CHECK: @_PROPERTIES__TtC11objc_bridge21OptionalBlockProperty = internal constant {{.*}} [[OBJC_BLOCK_PROPERTY]]
105105

106106
func getDescription(_ o: NSObject) -> String {
107107
return o.description

test/IRGen/objc_class_empty_fields.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// SR-1055
44

5-
// CHECK-64: @_DATA__TtC23objc_class_empty_fields14OneEnumWrapper = private constant { {{.*}}* } { i32 {{[0-9]+}}, i32 16, i32 24
6-
// CHECK-32: @_DATA__TtC23objc_class_empty_fields14OneEnumWrapper = private constant { {{.*}}* } { i32 {{[0-9]+}}, i32 8, i32 12
5+
// CHECK-64: @_DATA__TtC23objc_class_empty_fields14OneEnumWrapper = internal constant { {{.*}}* } { i32 {{[0-9]+}}, i32 16, i32 24
6+
// CHECK-32: @_DATA__TtC23objc_class_empty_fields14OneEnumWrapper = internal constant { {{.*}}* } { i32 {{[0-9]+}}, i32 8, i32 12
77

88
enum OneCaseEnum {
99
case X

test/IRGen/objc_class_export.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// CHECK-SAME: i64 ptrtoint ({{.*}}* @_METACLASS_DATA__TtC17objc_class_export3Foo to i64)
2323
// CHECK-SAME: }
2424
// CHECK: [[FOO_NAME:@.*]] = private unnamed_addr constant [28 x i8] c"_TtC17objc_class_export3Foo\00"
25-
// CHECK: @_METACLASS_DATA__TtC17objc_class_export3Foo = private constant {{.*\*}} } {
25+
// CHECK: @_METACLASS_DATA__TtC17objc_class_export3Foo = internal constant {{.*\*}} } {
2626
// CHECK-SAME: i32 129,
2727
// CHECK-SAME: i32 40,
2828
// CHECK-SAME: i32 40,
@@ -35,7 +35,7 @@
3535
// CHECK-SAME: i8* null,
3636
// CHECK-SAME: i8* null
3737
// CHECK-SAME: }, section "__DATA, __objc_const", align 8
38-
// CHECK: @_DATA__TtC17objc_class_export3Foo = private constant {{.*\*}} } {
38+
// CHECK: @_DATA__TtC17objc_class_export3Foo = internal constant {{.*\*}} } {
3939
// CHECK-SAME: i32 128,
4040
// CHECK-SAME: i32 16,
4141
// CHECK-SAME: i32 24,

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 = private 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 = private 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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ 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" = private constant
19+
// CHECK-LABEL: @"_CATEGORY_PROTOCOLS_Gizmo_$_objc_extensions" = internal constant
2020
// CHECK-SAME: i64 1,
2121
// CHECK-SAME: @_PROTOCOL__TtP15objc_extensions11NewProtocol_
2222

23-
// CHECK-LABEL: @"_CATEGORY_Gizmo_$_objc_extensions" = private constant
23+
// CHECK-LABEL: @"_CATEGORY_Gizmo_$_objc_extensions" = internal constant
2424
// CHECK-SAME: i8* getelementptr inbounds ([16 x i8], [16 x i8]* [[CATEGORY_NAME]], i64 0, i64 0),
2525
// CHECK-SAME: %objc_class* @"OBJC_CLASS_$_Gizmo",
2626
// CHECK-SAME: @"_CATEGORY_INSTANCE_METHODS_Gizmo_$_objc_extensions",
@@ -60,7 +60,7 @@ extension Gizmo: NewProtocol {
6060

6161
// CHECK: [[CATEGORY_NAME_1:@.*]] = private unnamed_addr constant [17 x i8] c"objc_extensions1\00"
6262

63-
// CHECK: @"_CATEGORY_Gizmo_$_objc_extensions1" = private constant
63+
// CHECK: @"_CATEGORY_Gizmo_$_objc_extensions1" = internal constant
6464
// CHECK: i8* getelementptr inbounds ([17 x i8], [17 x i8]* [[CATEGORY_NAME_1]], i64 0, i64 0),
6565
// CHECK: %objc_class* @"OBJC_CLASS_$_Gizmo",
6666
// CHECK: {{.*}} @"_CATEGORY_INSTANCE_METHODS_Gizmo_$_objc_extensions1",
@@ -84,7 +84,7 @@ extension Gizmo {
8484
class Hoozit : NSObject {
8585
}
8686

87-
// CHECK-LABEL: @"_CATEGORY_INSTANCE_METHODS__TtC15objc_extensions6Hoozit_$_objc_extensions" = private 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, __objc_const", align 8
9696

97-
// CHECK-LABEL: @"_CATEGORY_CLASS_METHODS__TtC15objc_extensions6Hoozit_$_objc_extensions" = private 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* } {
@@ -104,7 +104,7 @@ class Hoozit : NSObject {
104104
// CHECK: }]
105105
// CHECK: }, section "__DATA, __objc_const", align 8
106106

107-
// CHECK-LABEL: @"_CATEGORY__TtC15objc_extensions6Hoozit_$_objc_extensions" = private constant
107+
// 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),
109109
// CHECK: %swift.type* {{.*}} @"$s15objc_extensions6HoozitCMf",
110110
// CHECK: {{.*}} @"_CATEGORY_INSTANCE_METHODS__TtC15objc_extensions6Hoozit_$_objc_extensions",
@@ -120,7 +120,7 @@ extension Hoozit {
120120

121121
class SwiftOnly { }
122122

123-
// CHECK-LABEL: @"_CATEGORY_INSTANCE_METHODS__TtC15objc_extensions9SwiftOnly_$_objc_extensions" = private 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* } {
@@ -153,7 +153,7 @@ extension NSObject {
153153
}
154154

155155

156-
// CHECK-LABEL: @"_CATEGORY__TtCC15objc_extensions5Outer5Inner_$_objc_extensions" = private constant
156+
// CHECK-LABEL: @"_CATEGORY__TtCC15objc_extensions5Outer5Inner_$_objc_extensions" = internal constant
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
@@ -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" = private constant {{.*}} [[NAME]], {{.*}} [[ATTR]], {{.*}}, section "__DATA, __objc_const", align 8
178+
// CHECK: @"_CATEGORY_PROPERTIES__TtC15objc_extensions8NSDogcow_$_objc_extensions" = internal constant {{.*}} [[NAME]], {{.*}} [[ATTR]], {{.*}}, section "__DATA, __objc_const", 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 = private 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ObjcDestructible: NSObject {
5050
// CHECK-macosx: [[FAIL_SIGNATURE:@.*]] = private unnamed_addr constant [12 x i8] c"c24@0:8^@16\00"
5151
// CHECK-ios: [[FAIL_SIGNATURE:@.*]] = private unnamed_addr constant [12 x i8] c"B24@0:8^@16\00"
5252
// CHECK-tvos: [[FAIL_SIGNATURE:@.*]] = private unnamed_addr constant [12 x i8] c"B24@0:8^@16\00"
53-
// CHECK: @_INSTANCE_METHODS__TtC12objc_methods3Foo = private constant { {{.*}}] } {
53+
// CHECK: @_INSTANCE_METHODS__TtC12objc_methods3Foo = internal constant { {{.*}}] } {
5454
// CHECK: i32 24,
5555
// CHECK: i32 10,
5656
// CHECK: [10 x { i8*, i8*, i8* }] [{
@@ -80,7 +80,7 @@ class ObjcDestructible: NSObject {
8080
// CHECK-ios: i8* bitcast (i1 (i8*, i8*, %4**)* @"$s12objc_methods3FooC4failyyKFTo" to i8*)
8181
// CHECK: }]
8282
// CHECK: }, section "__DATA, __objc_const", align 8
83-
// CHECK: @_INSTANCE_METHODS__TtC12objc_methods16ObjcDestructible = private constant { {{.*}}] } {
83+
// CHECK: @_INSTANCE_METHODS__TtC12objc_methods16ObjcDestructible = internal constant { {{.*}}] } {
8484
// CHECK: i32 24,
8585
// CHECK: i32 2,
8686
// CHECK: [2 x { i8*, i8*, i8* }] [{
@@ -95,7 +95,7 @@ class ObjcDestructible: NSObject {
9595
// CHECK: [[ARRAY_SIGNATURE_EXT:@.*]] = private unnamed_addr constant [29 x i8] c"@\22NSArray\2224@0:8@\22NSArray\2216\00"
9696
// CHECK: [[DICT_SIGNATURE_EXT:@.*]] = private unnamed_addr constant [39 x i8] c"@\22NSDictionary\2224@0:8@\22NSDictionary\2216\00"
9797
// CHECK: [[SET_SIGNATURE_EXT:@.*]] = private unnamed_addr constant [25 x i8] c"@\22NSSet\2224@0:8@\22NSSet\2216\00"
98-
// CHECK: @_PROTOCOL_METHOD_TYPES__TtP12objc_methods7Fooable_ = private constant [6 x i8*] [
98+
// CHECK: @_PROTOCOL_METHOD_TYPES__TtP12objc_methods7Fooable_ = internal constant [6 x i8*] [
9999
// CHECK: i8* getelementptr inbounds ([18 x i8], [18 x i8]* [[BLOCK_SIGNATURE_EXT_1]], i64 0, i64 0)
100100
// CHECK: i8* getelementptr inbounds ([19 x i8], [19 x i8]* [[BLOCK_SIGNATURE_EXT_2]], i64 0, i64 0)
101101
// CHECK: i8* getelementptr inbounds ([31 x i8], [31 x i8]* [[STRING_SIGNATURE_EXT]], i64 0, i64 0)

0 commit comments

Comments
 (0)