Skip to content

Commit 523b3b7

Browse files
committed
Various test updates for Linux, Windows, iOS, and x86_64 macOS
1 parent 34e4729 commit 523b3b7

14 files changed

+41
-41
lines changed

test/Interop/Cxx/class/inheritance/subscript-irgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ func testGetX() -> CInt {
99

1010
let _ = testGetX()
1111

12-
// CHECK: define {{.*}}linkonce_odr{{.*}} i32 @_ZNK30CopyTrackedDerivedDerivedClass67__synthesizedBaseCall_operatorSubscriptC__ZTS20CopyTrackedBaseClassEi(ptr {{.*}} %[[THIS_PTR:.*]], i32 {{.*}})
12+
// CHECK: define {{.*}}linkonce_odr{{.*}} i32 @{{.*}}synthesizedBaseCall_operatorSubscriptC{{.*}}(ptr {{.*}} %[[THIS_PTR:.*]], i32 {{.*}})
1313
// CHECK: %[[ADD_PTR:.*]] = getelementptr inbounds i8, ptr %{{.*}}, i{{32|64}} 4
1414
// CHECK: {{.*}}call {{.*}} i32 @{{.*}}CopyTrackedBaseClass{{.*}}(ptr {{.*}} %[[ADD_PTR]], i32 {{.*}}){{.*}}

test/Interop/Cxx/class/inheritance/virtual-methods-irgen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ d4.f()
2323
// CHECK: call swiftcc {{.*}} @"$sSo8Derived4V1fs5Int32VyF"
2424

2525
// CHECK: define {{.*}} @"$sSo8Derived4V1fs5Int32VyF"(ptr swiftself dereferenceable
26-
// CHECK: call {{.*}} @{{_ZN8Derived434__synthesizedBaseCall_f__ZTS5Base3Ev|"\?__synthesizedBaseCall_ZTS5Base3Ev@@QEAAHXZ"}}
26+
// CHECK: call {{.*}} @{{.*}}__synthesizedBaseCall_{{.*}}
2727

2828
// CHECK: define {{.*}}void @{{_ZN7DerivedIiE3fooEv|"\?foo@\?\$Derived@H@@UEAAXXZ"}}
29-
// CHECK: call void @{{_Z21testFunctionCollectedv|"\?testFunctionCollected@@YAXXZ"}}
29+
// CHECK: call void @{{.*}}testFunctionCollected
3030

31-
// CHECK: define {{.*}}void @{{_Z21testFunctionCollectedv|"\?testFunctionCollected@@YAXXZ"}}
31+
// CHECK: define {{.*}}void @{{.*}}testFunctionCollected
3232

3333
// CHECK-NOT: _ZN6UnusedIiE3fooEv
3434
// CHECK-NOT: "\?foo@\?\$Unused@H@@UEAAXXZ"

test/Interop/Cxx/class/method/methods-silgen.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import Methods
44

55
// clang name: ReferenceParams::ReferenceParams
6-
// CHECK: sil [asmname "_ZN15ReferenceParamsC1ERKiS1_"] [clang ReferenceParams.init] @$sSo15ReferenceParamsVyABs5Int32V_ADtcfCTo : $@convention(c) (@in_guaranteed Int32, @in_guaranteed Int32) -> @out ReferenceParams
6+
// CHECK: sil [asmname "{{.*}}"] [clang ReferenceParams.init] @$sSo15ReferenceParamsVyABs5Int32V_ADtcfCTo : $@convention(c) (@in_guaranteed Int32, @in_guaranteed Int32) -> @out ReferenceParams
77

88
// clang name: ReferenceParams::staticMethod
9-
// CHECK: sil [asmname "_ZN15ReferenceParams12staticMethodERKiS1_"] [clang ReferenceParams.staticMethod] @$sSo15ReferenceParamsV12staticMethodyys5Int32V_AEtFZTo : $@convention(c) (@in_guaranteed Int32, @in_guaranteed Int32) -> ()
9+
// CHECK: sil [asmname "{{.*}}staticMethod{{.*}}"] [clang ReferenceParams.staticMethod] @$sSo15ReferenceParamsV12staticMethodyys5Int32V_AEtFZTo : $@convention(c) (@in_guaranteed Int32, @in_guaranteed Int32) -> ()
1010

1111
public func use() {
1212
let a = CInt(42)

test/Interop/Cxx/class/type-classification-non-trivial-silgen-windows.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import TypeClassification
88
// "destroy_addr".
99
// CHECK-LABEL: sil [ossa] @$s4main24testStructWithDestructoryyF
1010
// CHECK: [[AS:%.*]] = alloc_stack [lexical] [var_decl] $StructWithDestructor
11-
// CHECK: [[FN:%.*]] = function_ref @{{_ZN20StructWithDestructorC1Ev|\?\?0StructWithDestructor@@QEAA@XZ}} : $@convention(c) () -> @out StructWithDestructor
11+
// CHECK: [[FN:%.*]] = function_ref @$sSo20StructWithDestructorVABycfCTo : $@convention(c) () -> @out StructWithDestructor
1212
// CHECK: apply [[FN]]([[AS]]) : $@convention(c) () -> @out StructWithDestructor
1313
// CHECK: destroy_addr [[AS]]
1414
// CHECK: dealloc_stack %0 : $*StructWithDestructor
1515
// CHECK-LABEL: end sil function '$s4main24testStructWithDestructoryyF'
1616

17-
// CHECK-LABEL: sil [clang StructWithDestructor.init] @{{_ZN20StructWithDestructorC1Ev|\?\?0StructWithDestructor@@QEAA@XZ}} : $@convention(c) () -> @out StructWithDestructor
17+
// CHECK-LABEL: sil [asmname "{{.*}}"] [clang StructWithDestructor.init] @{{.*}}StructWithDestructor{{.*}} : $@convention(c) () -> @out StructWithDestructor
1818
public func testStructWithDestructor() {
1919
let d = StructWithDestructor()
2020
}

test/Interop/Cxx/class/type-classification-non-trivial-silgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swiftxx-frontend -I %S/Inputs -Xllvm -sil-print-types -emit-silgen %s | %FileCheck --dump-input-filter=all %s
22

3-
// REQUIRES: OS=macosx || OS=linux-android
3+
// REQUIRES: OS=macosx || OS=linux-android || OS=windows-msvc
44

55
import TypeClassification
66

test/Interop/Cxx/foreign-reference/move-only-silgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ public func test() {
2525
_ = x.test()
2626
}
2727

28-
// CHECK-LABEL: sil [available 13.3.0] [asmname "_ZN8MoveOnly6createEv"] [clang MoveOnly.create] @$sSo8MoveOnlyV6createAByFZTo : $@convention(c) () -> MoveOnly
28+
// CHECK-LABEL: sil {{.*}}[asmname "{{.*}}create{{.*}}"] [clang MoveOnly.create] @$sSo8MoveOnlyV6createAByFZTo : $@convention(c) () -> MoveOnly

test/Interop/Cxx/foreign-reference/pod-silgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ public func test() {
3232
_ = x.test()
3333
}
3434

35-
// CHECK-LABEL: sil [available 13.3.0] [asmname "_ZN7IntPair6createEv"] [clang IntPair.create] @$sSo7IntPairV6createAByFZTo : $@convention(c) () -> IntPair
35+
// CHECK-LABEL: sil {{.*}}[asmname "{{.*}}create{{.*}}"] [clang IntPair.create] @$sSo7IntPairV6createAByFZTo : $@convention(c) () -> IntPair

test/Interop/Cxx/foreign-reference/singleton-silgen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public func test() {
3131
mutateIt(x)
3232
}
3333

34-
// CHECK-LABEL: sil [available 13.3.0] [asmname "_ZN21DeletedSpecialMembers6createEv"] [clang DeletedSpecialMembers.create] @$sSo21DeletedSpecialMembersV6createAByFZTo : $@convention(c) () -> DeletedSpecialMembers
34+
// CHECK-LABEL: sil {{.*}}[asmname "{{.*}}create{{.*}}"] [clang DeletedSpecialMembers.create] @$sSo21DeletedSpecialMembersV6createAByFZTo : $@convention(c) () -> DeletedSpecialMembers
3535

36-
// CHECK-LABEL: sil [available 13.3.0] [asmname "_ZNK21DeletedSpecialMembers4testEv"] [clang DeletedSpecialMembers.test] @$sSo21DeletedSpecialMembersV4tests5Int32VyFTo : $@convention(cxx_method) (DeletedSpecialMembers) -> Int32
36+
// CHECK-LABEL: sil {{.*}}[asmname "{{.*}}test{{.*}}"] [clang DeletedSpecialMembers.test] @$sSo21DeletedSpecialMembersV4tests5Int32VyFTo : $@convention(cxx_method) (DeletedSpecialMembers) -> Int32
3737

38-
// CHECK-LABEL: sil [serialized] [asmname "_Z8mutateItR21DeletedSpecialMembers"] [clang mutateIt] @$sSo8mutateItyySo21DeletedSpecialMembersVFTo : $@convention(c) (DeletedSpecialMembers) -> ()
38+
// CHECK-LABEL: sil [serialized] [asmname "{{.*}}mutate{{.*}}"] [clang mutateIt] @$sSo8mutateItyySo21DeletedSpecialMembersVFTo : $@convention(c) (DeletedSpecialMembers) -> ()

test/Interop/Cxx/operators/member-inline-silgen.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public func call(_ wrapper: inout LoadableIntWrapper, _ arg: Int32) -> Int32 { w
2828
// CHECK: apply [[OP]]([[RHS]], [[SELFACCESS]]) : $@convention(cxx_method) (Int32, @inout LoadableIntWrapper) -> Int32
2929
// CHECK: end_access [[SELFACCESS]] : $*LoadableIntWrapper
3030

31-
// CHECK: sil [asmname "_ZN18LoadableIntWrapperclEi"] [clang LoadableIntWrapper.callAsFunction] @$sSo18LoadableIntWrapperV14callAsFunctionys5Int32VAEFTo : $@convention(cxx_method) (Int32, @inout LoadableIntWrapper) -> Int32
31+
// CHECK: sil [asmname "{{.*}}"] [clang LoadableIntWrapper.callAsFunction] @$sSo18LoadableIntWrapperV14callAsFunctionys5Int32VAEFTo : $@convention(cxx_method) (Int32, @inout LoadableIntWrapper) -> Int32
3232

3333
public func call(_ wrapper: inout AddressOnlyIntWrapper) -> Int32 { wrapper() }
3434

@@ -38,7 +38,7 @@ public func call(_ wrapper: inout AddressOnlyIntWrapper) -> Int32 { wrapper() }
3838
// CHECK: apply [[OP]]([[SELFACCESS]]) : $@convention(cxx_method) (@inout AddressOnlyIntWrapper) -> Int32
3939
// CHECK: end_access [[SELFACCESS]] : $*AddressOnlyIntWrapper
4040

41-
// CHECK: sil [asmname "_ZN21AddressOnlyIntWrapperclEv"] [clang AddressOnlyIntWrapper.callAsFunction] @$sSo21AddressOnlyIntWrapperV14callAsFunctions5Int32VyFTo : $@convention(cxx_method) (@inout AddressOnlyIntWrapper) -> Int32
41+
// CHECK: sil [asmname "{{.*}}"] [clang AddressOnlyIntWrapper.callAsFunction] @$sSo21AddressOnlyIntWrapperV14callAsFunctions5Int32VyFTo : $@convention(cxx_method) (@inout AddressOnlyIntWrapper) -> Int32
4242

4343
public func index(_ arr: ReadOnlyIntArray, _ arg: Int32) -> Int32 { arr[arg] }
4444

@@ -180,12 +180,12 @@ public func subscriptUnnamed(_ unnamed: SubscriptUnnamedParameter, _ arg: Int32)
180180
// CHECK: dealloc_stack [[SELFACCESS]]
181181
// CHECK: } // end sil function '$sSo25SubscriptUnnamedParameterVys5Int32VADcig'
182182

183-
// CHECK: sil [asmname "_ZNK16ReadOnlyIntArrayixEi"] [clang ReadOnlyIntArray.__operatorSubscriptConst] @$sSo16ReadOnlyIntArrayV24__operatorSubscriptConstySPys5Int32VGAEFTo : $@convention(cxx_method) (Int32, @in_guaranteed ReadOnlyIntArray) -> UnsafePointer<Int32>
184-
// CHECK: sil [asmname "_ZN17ReadWriteIntArrayixEi"] [clang ReadWriteIntArray.__operatorSubscript] @$sSo17ReadWriteIntArrayV19__operatorSubscriptySpys5Int32VGAEFTo : $@convention(cxx_method) (Int32, @inout ReadWriteIntArray) -> UnsafeMutablePointer<Int32>
185-
// CHECK: sil [asmname "_ZNK23NonTrivialIntArrayByValixEi"] [clang NonTrivialIntArrayByVal.__operatorSubscriptConst] @$sSo23NonTrivialIntArrayByValV24__operatorSubscriptConstys5Int32VAEFTo : $@convention(cxx_method) (Int32, @in_guaranteed NonTrivialIntArrayByVal) -> Int32
183+
// CHECK: sil [asmname "{{.*}}ReadOnlyIntArray{{.*}}"] [clang ReadOnlyIntArray.__operatorSubscriptConst] @$sSo16ReadOnlyIntArrayV24__operatorSubscriptConstySPys5Int32VGAEFTo : $@convention(cxx_method) (Int32, @in_guaranteed ReadOnlyIntArray) -> UnsafePointer<Int32>
184+
// CHECK: sil [asmname "{{.*}}ReadWriteIntArray{{.*}}"] [clang ReadWriteIntArray.__operatorSubscript] @$sSo17ReadWriteIntArrayV19__operatorSubscriptySpys5Int32VGAEFTo : $@convention(cxx_method) (Int32, @inout ReadWriteIntArray) -> UnsafeMutablePointer<Int32>
185+
// CHECK: sil [asmname "{{.*}}NonTrivialIntArrayByVal{{.*}}"] [clang NonTrivialIntArrayByVal.__operatorSubscriptConst] @$sSo23NonTrivialIntArrayByValV24__operatorSubscriptConstys5Int32VAEFTo : $@convention(cxx_method) (Int32, @in_guaranteed NonTrivialIntArrayByVal) -> Int32
186186

187-
// CHECK: sil [asmname "_ZN8PtrByValixEi"] [clang PtrByVal.__operatorSubscript] @$sSo8PtrByValV19__operatorSubscriptySpys5Int32VGSgAEFTo : $@convention(cxx_method) (Int32, @inout PtrByVal) -> Optional<UnsafeMutablePointer<Int32>>
188-
// CHECK: sil [asmname "_ZN8RefToPtrixEi"] [clang RefToPtr.__operatorSubscript] @$sSo8RefToPtrV19__operatorSubscriptySpySpys5Int32VGSgGAEFTo : $@convention(cxx_method) (Int32, @inout RefToPtr) -> UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int32>>>
189-
// CHECK: sil [asmname "_ZN8PtrToPtrixEi"] [clang PtrToPtr.__operatorSubscript] @$sSo05PtrToA0V19__operatorSubscriptySpySpys5Int32VGSgGSgAEFTo : $@convention(cxx_method) (Int32, @inout PtrToPtr) -> Optional<UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int32>>>>
190-
// CHECK: sil [asmname "_ZNK15ConstOpPtrByValixEi"] [clang ConstOpPtrByVal.__operatorSubscriptConst] @$sSo15ConstOpPtrByValV019__operatorSubscriptA0ySPys5Int32VGSgAEFTo : $@convention(cxx_method) (Int32, @in_guaranteed ConstOpPtrByVal) -> Optional<UnsafePointer<Int32>>
191-
// CHECK: sil [asmname "_ZN13ConstPtrByValixEi"] [clang ConstPtrByVal.__operatorSubscriptConst] @$sSo13ConstPtrByValV019__operatorSubscriptA0ySPys5Int32VGSgAEFTo : $@convention(cxx_method) (Int32, @inout ConstPtrByVal) -> Optional<UnsafePointer<Int32>>
187+
// CHECK: sil [asmname "{{.*}}PtrByVal{{.*}}"] [clang PtrByVal.__operatorSubscript] @$sSo8PtrByValV19__operatorSubscriptySpys5Int32VGSgAEFTo : $@convention(cxx_method) (Int32, @inout PtrByVal) -> Optional<UnsafeMutablePointer<Int32>>
188+
// CHECK: sil [asmname "{{.*}}RefToPtr{{.*}}"] [clang RefToPtr.__operatorSubscript] @$sSo8RefToPtrV19__operatorSubscriptySpySpys5Int32VGSgGAEFTo : $@convention(cxx_method) (Int32, @inout RefToPtr) -> UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int32>>>
189+
// CHECK: sil [asmname "{{.*}}PtrToPtr{{.*}}"] [clang PtrToPtr.__operatorSubscript] @$sSo05PtrToA0V19__operatorSubscriptySpySpys5Int32VGSgGSgAEFTo : $@convention(cxx_method) (Int32, @inout PtrToPtr) -> Optional<UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int32>>>>
190+
// CHECK: sil [asmname "{{.*}}ConstOpPtrByVal{{.*}}"] [clang ConstOpPtrByVal.__operatorSubscriptConst] @$sSo15ConstOpPtrByValV019__operatorSubscriptA0ySPys5Int32VGSgAEFTo : $@convention(cxx_method) (Int32, @in_guaranteed ConstOpPtrByVal) -> Optional<UnsafePointer<Int32>>
191+
// CHECK: sil [asmname "{{.*}}ConstPtrByVal{{.*}}"] [clang ConstPtrByVal.__operatorSubscriptConst] @$sSo13ConstPtrByValV019__operatorSubscriptA0ySPys5Int32VGSgAEFTo : $@convention(cxx_method) (Int32, @inout ConstPtrByVal) -> Optional<UnsafePointer<Int32>>

test/Interop/Cxx/operators/member-out-of-line-silgen.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ public func add(_ lhs: LoadableIntWrapper, _ rhs: LoadableIntWrapper) -> Loadabl
99
// CHECK-SYSV: [[FUNC:%.*]] = function_ref @$sSo18LoadableIntWrapperV14__operatorPlusyA2BFTo : $@convention(cxx_method) (LoadableIntWrapper, @in_guaranteed LoadableIntWrapper) -> LoadableIntWrapper
1010
// CHECK-SYSV: apply [[FUNC]]([[ACCESS:%.*]], [[STORE_LOC]]) : $@convention(cxx_method) (LoadableIntWrapper, @in_guaranteed LoadableIntWrapper) -> LoadableIntWrapper
1111

12-
// CHECK-SYSV: sil [asmname "_ZNK18LoadableIntWrapperplES_"] [clang LoadableIntWrapper.__operatorPlus] @$sSo18LoadableIntWrapperV14__operatorPlusyA2BFTo : $@convention(cxx_method) (LoadableIntWrapper, @in_guaranteed LoadableIntWrapper) -> LoadableIntWrapper
12+
// CHECK-SYSV: sil [asmname "{{.*}}"] [clang LoadableIntWrapper.__operatorPlus] @$sSo18LoadableIntWrapperV14__operatorPlusyA2BFTo : $@convention(cxx_method) (LoadableIntWrapper, @in_guaranteed LoadableIntWrapper) -> LoadableIntWrapper
1313

1414
// CHECK-WIN: bb0([[LHS:%.*]] : $LoadableIntWrapper, [[RHS:%.*]] : $LoadableIntWrapper):
1515
// CHECK-WIN: store [[LHS]] to [[STORE_LOC:%.*]] : $*LoadableIntWrapper
1616
// CHECK-WIN: [[FUNC:%.*]] = function_ref @$sSo18LoadableIntWrapperV14__operatorPlusyA2BFTo : $@convention(cxx_method) (LoadableIntWrapper, @in_guaranteed LoadableIntWrapper) -> LoadableIntWrapper
1717
// CHECK-WIN: apply [[FUNC]]([[ACCESS:%.*]], [[STORE_LOC]]) : $@convention(cxx_method) (LoadableIntWrapper, @in_guaranteed LoadableIntWrapper) -> LoadableIntWrapper
1818

19-
// CHECK-WIN: sil [asmname "_ZNK18LoadableIntWrapperplES_"] [clang LoadableIntWrapper.__operatorPlus] @$sSo18LoadableIntWrapperV14__operatorPlusyA2BFTo : $@convention(cxx_method) (LoadableIntWrapper, @in_guaranteed LoadableIntWrapper) -> LoadableIntWrapper
19+
// CHECK-WIN: sil [asmname "{{.*}}"] [clang LoadableIntWrapper.__operatorPlus] @$sSo18LoadableIntWrapperV14__operatorPlusyA2BFTo : $@convention(cxx_method) (LoadableIntWrapper, @in_guaranteed LoadableIntWrapper) -> LoadableIntWrapper

0 commit comments

Comments
 (0)