Skip to content

Commit 46ae13b

Browse files
committed
[Mangling] Update SILGen and IRGen tests for mangling change.
(cherry picked from commit a66df57)
1 parent 3f360a7 commit 46ae13b

File tree

54 files changed

+274
-278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+274
-278
lines changed

test/DebugInfo/mangling.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ func markUsed<T>(_ t: T) {}
88
// Variable:
99
// mangling.myDict : Swift.Dictionary<Swift.Int64, Swift.String>
1010
// CHECK: !DIGlobalVariable(name: "myDict",
11-
// CHECK-SAME: linkageName: "$S8mangling6myDicts10DictionaryVys5Int64VSSGvp",
11+
// CHECK-SAME: linkageName: "$S8mangling6myDictSDys5Int64VSSGvp",
1212
// CHECK-SAME: line: [[@LINE+3]]
1313
// CHECK-SAME: type: ![[DT:[0-9]+]]
1414
// CHECK: ![[DT]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Dictionary"

test/Demangle/Inputs/manglings.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ _TtSV ---> Swift.UnsafeRawPointer
2323
_TtSv ---> Swift.UnsafeMutableRawPointer
2424
_TtGSaSS_ ---> [Swift.String]
2525
_TtGSqSS_ ---> Swift.String?
26-
_TtGSQSS_ ---> Swift.String!
2726
_TtGVs10DictionarySSSi_ ---> [Swift.String : Swift.Int]
2827
_TtVs7CString ---> Swift.CString
2928
_TtCSo8NSObject ---> __C.NSObject
@@ -287,10 +286,6 @@ _T03nix6testitSaySiGyFTv_ ---> outlined variable #0 of nix.testit() -> [Swift.In
287286
_T03nix6testitSaySiGyFTv0_ ---> outlined variable #1 of nix.testit() -> [Swift.Int]
288287
_T0So11UITextFieldC4textSSSgvgToTepb_ ---> outlined bridged method (pb) of @objc __C.UITextField.text.getter : Swift.String?
289288
_T0So11UITextFieldC4textSSSgvgToTeab_ ---> outlined bridged method (ab) of @objc __C.UITextField.text.getter : Swift.String?
290-
_T0So5GizmoC11doSomethingSQyypGSQySaySSGGFToTembnn_ ---> outlined bridged method (mbnn) of @objc __C.Gizmo.doSomething([Swift.String]!) -> Any!
291-
_T0So5GizmoC12modifyStringSQySSGAD_Si10withNumberSQyypG0D6FoobartFToTembnnnb_ ---> outlined bridged method (mbnnnb) of @objc __C.Gizmo.modifyString(_: Swift.String!, withNumber: Swift.Int, withFoobar: Any!) -> Swift.String!
292-
_$SSo5GizmoC11doSomethingySQyypGSQySaySSGGFToTembnn_ ---> outlined bridged method (mbnn) of @objc __C.Gizmo.doSomething([Swift.String]!) -> Any!
293-
_$SSo5GizmoC12modifyString_10withNumber0D6FoobarSQySSGAF_SiSQyypGtFToTembnnnb_ ---> outlined bridged method (mbnnnb) of @objc __C.Gizmo.modifyString(_: Swift.String!, withNumber: Swift.Int, withFoobar: Any!) -> Swift.String!
294289
_T04test1SVyxGAA1RA2A1ZRzAA1Y2ZZRpzl1A_AhaGPWT ---> {C} associated type witness table accessor for A.ZZ : test.Y in <A where A: test.Z, A.ZZ: test.Y> test.S<A> : test.R in test
295290
_T0s24_UnicodeScalarExceptions33_0E4228093681F6920F0AB2E48B4F1C69LLVACycfC ---> Swift.(_UnicodeScalarExceptions in _0E4228093681F6920F0AB2E48B4F1C69).init() -> Swift.(_UnicodeScalarExceptions in _0E4228093681F6920F0AB2E48B4F1C69)
296291
_T0D ---> _T0D

test/IDE/reconstruct_type_from_mangled_name.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ struct HasGenericSubscript<T> {
327327
private
328328
// CHECK: decl: private func patatino<T>(_ vers1: T, _ vers2: T) -> Bool where T : Comparable for
329329
func patatino<T: Comparable>(_ vers1: T, _ vers2: T) -> Bool {
330-
// CHECK: decl: FAILURE for 'T' usr=s:14swift_ide_test8patatino33_D7B956AE2D93947DFA67A1ECF93EF238LLySbx_xts10ComparableRzlF1TL_xmfp decl
331-
// CHECK: decl: let vers1: T for 'vers1' usr=s:14swift_ide_test8patatino33_D7B956AE2D93947DFA67A1ECF93EF238LLySbx_xts10ComparableRzlF5vers1L_xvp
332-
// CHECK: decl: let vers2: T for 'vers2' usr=s:14swift_ide_test8patatino33_D7B956AE2D93947DFA67A1ECF93EF238LLySbx_xts10ComparableRzlF5vers2L_xvp
330+
// CHECK: decl: FAILURE for 'T' usr=s:14swift_ide_test8patatino33_D7B956AE2D93947DFA67A1ECF93EF238LLySbx_xtSLRzlF1TL_xmfp decl
331+
// CHECK: decl: let vers1: T for 'vers1' usr=s:14swift_ide_test8patatino33_D7B956AE2D93947DFA67A1ECF93EF238LLySbx_xtSLRzlF5vers1L_xvp
332+
// CHECK: decl: let vers2: T for 'vers2' usr=s:14swift_ide_test8patatino33_D7B956AE2D93947DFA67A1ECF93EF238LLySbx_xtSLRzlF5vers2L_xvp
333333
return vers1 < vers2;
334334
}

test/IRGen/big_types_corner_cases.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ public struct MUseStruct {
185185

186186
// CHECK-LABEL-64: define{{( protected)?}} swiftcc void @"$S22big_types_corner_cases18stringAndSubstringSS_s0G0VtyF"(<{ %TSS, %Ts9SubstringV }>* noalias nocapture sret) #0 {
187187
// CHECK-LABEL-32: define{{( protected)?}} swiftcc void @"$S22big_types_corner_cases18stringAndSubstringSS_s0G0VtyF"(<{ %TSS, [4 x i8], %Ts9SubstringV }>* noalias nocapture sret) #0 {
188-
// CHECK: alloca %Ts9SubstringV
189-
// CHECK: alloca %Ts9SubstringV
188+
// CHECK: alloca %TSs
189+
// CHECK: alloca %TSs
190190
// CHECK: ret void
191191
public func stringAndSubstring() -> (String, Substring) {
192192
let s = "Hello, World"
@@ -207,15 +207,15 @@ public func testGetFunc() {
207207
// CHECK-LABEL: define{{( protected)?}} hidden swiftcc void @"$S22big_types_corner_cases7TestBigC4testyyF"(%T22big_types_corner_cases7TestBigC* swiftself)
208208
// CHECK: [[T0:%.*]] = call swiftcc %swift.metadata_response @"$SSayy22big_types_corner_cases9BigStructVcSgGMa"
209209
// CHECK: [[CALL1:%.*]] = extractvalue %swift.metadata_response [[T0]], 0
210-
// CHECK: [[CALL2:%.*]] = call i8** @"$SSayy22big_types_corner_cases9BigStructVcSgGSayxGs10CollectionsWl
211-
// CHECK: call swiftcc void @"$Ss10CollectionPsE10firstIndex5where0C0QzSgSb7ElementQzKXE_tKF"(%TSq.{{.*}}* noalias nocapture sret {{.*}}, i8* bitcast (i1 (%T22big_types_corner_cases9BigStructVytIegnr_Sg*, %swift.refcounted*, %swift.error**)* @"$S22big_types_corner_cases9BigStructVIegy_SgSbs5Error_pIggdzo_ACytIegnr_SgSbsAE_pIegndzo_TRTA" to i8*), %swift.opaque* {{.*}}, %swift.type* [[CALL1]], i8** [[CALL2]], %swift.opaque* noalias nocapture swiftself
210+
// CHECK: [[CALL2:%.*]] = call i8** @"$SSayy22big_types_corner_cases9BigStructVcSgGSayxGSlsWl
211+
// CHECK: call swiftcc void @"$SSlsE10firstIndex5where0B0QzSgSb7ElementQzKXE_tKF"(%TSq.{{.*}}* noalias nocapture sret {{.*}}, i8* bitcast (i1 (%T22big_types_corner_cases9BigStructVytIegnr_Sg*, %swift.refcounted*, %swift.error**)* @"$S22big_types_corner_cases9BigStructVIegy_SgSbs5Error_pIggdzo_ACytIegnr_SgSbsAE_pIegndzo_TRTA" to i8*), %swift.opaque* {{.*}}, %swift.type* [[CALL1]], i8** [[CALL2]], %swift.opaque* noalias nocapture swiftself
212212
// CHECK: ret void
213213

214214
// CHECK-LABEL: define{{( protected)?}} hidden swiftcc void @"$S22big_types_corner_cases7TestBigC5test2yyF"(%T22big_types_corner_cases7TestBigC* swiftself)
215215
// CHECK: [[T0:%.*]] = call swiftcc %swift.metadata_response @"$SSaySS2ID_y22big_types_corner_cases9BigStructVcSg7handlertGMa"
216216
// CHECK: [[CALL1:%.*]] = extractvalue %swift.metadata_response [[T0]], 0
217-
// CHECK: [[CALL2:%.*]] = call i8** @"$SSaySS2ID_y22big_types_corner_cases9BigStructVcSg7handlertGSayxGs10CollectionsWl"
218-
// CHECK: call swiftcc void @"$Ss10CollectionPss16IndexingIteratorVyxG0C0RtzrlE04makeC0AEyF"(%Ts16IndexingIteratorV* noalias nocapture sret {{.*}}, %swift.type* [[CALL1]], i8** [[CALL2]], %swift.opaque* noalias nocapture swiftself {{.*}})
217+
// CHECK: [[CALL2:%.*]] = call i8** @"$SSaySS2ID_y22big_types_corner_cases9BigStructVcSg7handlertGSayxGSlsWl"
218+
// CHECK: call swiftcc void @"$SSlss16IndexingIteratorVyxG0B0RtzrlE04makeB0ACyF"(%Ts16IndexingIteratorV* noalias nocapture sret {{.*}}, %swift.type* [[CALL1]], i8** [[CALL2]], %swift.opaque* noalias nocapture swiftself {{.*}})
219219
// CHECK: ret void
220220
class TestBig {
221221
typealias Handler = (BigStruct) -> Void

test/IRGen/objc_bridge.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ import Foundation
8888
// CHECK: { i8*, i8*, i8* } {
8989
// CHECK: i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"\01L_selector_data(acceptSet:)", i64 0, i64 0),
9090
// CHECK: i8* getelementptr inbounds ([11 x i8], [11 x i8]* @{{[0-9]+}}, i64 0, i64 0),
91-
// CHECK: i8* bitcast (void (%3*, i8*, %4*)* @"$S11objc_bridge3BasC9acceptSetyys0E0VyACSo8NSObjectCs8Hashable10ObjectiveCg_GFTo" to i8*)
91+
// CHECK: i8* bitcast (void (%3*, i8*, %4*)* @"$S11objc_bridge3BasC9acceptSetyyShyACSo8NSObjectCSH10ObjectiveCg_GFTo" to i8*)
9292
// CHECK: }
9393
// CHECK: { i8*, i8*, i8* } {
9494
// CHECK: i8* getelementptr inbounds ([14 x i8], [14 x i8]* @"\01L_selector_data(.cxx_destruct)", i64 0, i64 0),

test/IRGen/objc_extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ extension NSDogcow {
179179
@NSManaged var woof: Int
180180
}
181181

182-
// CHECK: @"$SSo8NSObjectC15objc_extensionsE8SomeEnum33_1F05E59585E0BB585FCA206FBFF1A92DLLOs9EquatableACWp" =
182+
// CHECK: @"$SSo8NSObjectC15objc_extensionsE8SomeEnum33_1F05E59585E0BB585FCA206FBFF1A92DLLOSQACWp" =
183183

184184
class SwiftSubGizmo : SwiftBaseGizmo {
185185

test/IRGen/objc_generic_class_metadata.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ entry(%0: $Subclass):
7373
unreachable
7474
}
7575

76-
sil @$S27objc_generic_class_metadata8SubclassC7optionsACSgs10DictionaryVySo13GenericOptionaypGSg_tcfcTo : $@convention(objc_method) (@owned Subclass, @owned NSDictionary) -> @owned Subclass {
76+
sil @$S27objc_generic_class_metadata8SubclassC7optionsACSgSDySo13GenericOptionaypGSg_tcfcTo : $@convention(objc_method) (@owned Subclass, @owned NSDictionary) -> @owned Subclass {
7777
entry(%0: $Subclass, %1: $NSDictionary):
7878
unreachable
7979
}

test/IRGen/objc_ns_enum.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import gizmo
1111
// CHECK: @"$SSo16NSRuncingOptionsVWV" = linkonce_odr hidden constant
1212
// CHECK: @"$SSo16NSRuncingOptionsVMn" = linkonce_odr hidden constant
1313
// CHECK: @"$SSo16NSRuncingOptionsVN" = linkonce_odr hidden global
14-
// CHECK: @"$SSo28NeverActuallyMentionedByNameVs9EquatableSCWp" = linkonce_odr hidden constant
14+
// CHECK: @"$SSo28NeverActuallyMentionedByNameVSQSCWp" = linkonce_odr hidden constant
1515

1616
// CHECK-LABEL: define{{( protected)?}} i32 @main
1717
// CHECK: call swiftcc %swift.metadata_response @"$SSo16NSRuncingOptionsVMa"(i64 0)

test/IRGen/objc_pointers.swift

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

1010
@objc class Foo : NSObject {
11-
// CHECK: define internal void @"$S13objc_pointers3FooC16pointerArguments_1y1z1wySpySiG_SvSPySiGs33AutoreleasingUnsafeMutablePointerVyACSgGtFTo"(%0*, i8*, i64*, i8*, i64*, %0**)
11+
// CHECK: define internal void @"$S13objc_pointers3FooC16pointerArguments_1y1z1wySpySiG_SvSPySiGSAyACSgGtFTo"(%0*, i8*, i64*, i8*, i64*, %0**)
1212
@objc func pointerArguments(_ x: UnsafeMutablePointer<Int>,
1313
y: UnsafeMutableRawPointer,
1414
z: UnsafePointer<Int>,
1515
w: AutoreleasingUnsafeMutablePointer<Foo?>) {}
1616

17-
// CHECK: define internal void @"$S13objc_pointers3FooC24pointerMetatypeArguments1x1yys33AutoreleasingUnsafeMutablePointerVyyXlXpG_AHyyXlXpSgGtFTo"(%0*, i8*, i8**, i8**)
17+
// CHECK: define internal void @"$S13objc_pointers3FooC24pointerMetatypeArguments1x1yySAyyXlXpG_SAyyXlXpSgGtFTo"(%0*, i8*, i8**, i8**)
1818
@objc func pointerMetatypeArguments(x: AutoreleasingUnsafeMutablePointer<AnyClass>,
1919
y: AutoreleasingUnsafeMutablePointer<AnyClass?>) {}
2020
}

test/IRGen/property_descriptor.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ sil_property #ExternalGeneric.computedRW <T: Comparable> (
7777
getter @get_computed_generic : $@convention(thin) <T: Comparable> (@in_guaranteed ExternalGeneric<T>) -> @out T,
7878
setter @set_computed_generic : $@convention(thin) <T: Comparable> (@in_guaranteed T, @inout ExternalGeneric<T>) -> ())
7979

80-
// CHECK: @"$S19property_descriptor15ExternalGenericVyxqd__cs8HashableRd__luipMV" ={{( protected)?}} constant
80+
// CHECK: @"$S19property_descriptor15ExternalGenericVyxqd__cSHRd__luipMV" ={{( dllexport)?}}{{( protected)?}} constant
8181
// -- 0x01c8_0000 - computed, settable, mutating, has arguments
8282
// CHECK-SAME: <{ <i32 0x01c8_0000>,
8383
// CHECK-SAME: @id_computed,

0 commit comments

Comments
 (0)