Skip to content

Commit a8424a0

Browse files
committed
Fix test msvc-abi-return-indirect-trivial-record.swift for windows aarch64
The test msvc-abi-return-indirect-trivial-record.swift fails on windows aarch64 because the type of the third argument of @"??YLoadableIntWrapper@@qeaa?AU0@U0@@z" (@LoadableIntWrapper::operator+=(LoadableIntWrapper)) is i64 which differs from i32 for x86_64. Accommodate this as this is how Clang generates code. See https://godbolt.org/z/G76aMr5M9.
1 parent 26653a7 commit a8424a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/Interop/Cxx/class/method/msvc-abi-return-indirect-trivial-record.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: rm -rf %t
22
// RUN: split-file %s %t
3-
// RUN: %target-swift-emit-irgen -I %t/Inputs -enable-experimental-cxx-interop -Xcc -std=c++17 %t/test.swift -module-name Test | %FileCheck %s
3+
// RUN: %target-swift-emit-irgen -I %t/Inputs -enable-experimental-cxx-interop -Xcc -std=c++17 %t/test.swift -module-name Test | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-cpu
44

55
// REQUIRES: OS=windows-msvc
66

@@ -67,4 +67,5 @@ public func passTempForIndirectRetToVoidCall() {
6767

6868
// CHECK: void @"$sSo18LoadableIntWrapperV2peoiyyABz_ABtFZ"(ptr
6969
// CHECK: %[[OPRESULT:.*]] = alloca %struct.LoadableIntWrapper, align 16
70-
// CHECK: call void @"??YLoadableIntWrapper@@QEAA?AU0@U0@@Z"(ptr {{.*}}, ptr sret(%struct.LoadableIntWrapper) %[[OPRESULT]], i32
70+
// CHECK-x86_64: call void @"??YLoadableIntWrapper@@QEAA?AU0@U0@@Z"(ptr {{.*}}, ptr sret(%struct.LoadableIntWrapper) %[[OPRESULT]], i32
71+
// CHECK-aarch64: call void @"??YLoadableIntWrapper@@QEAA?AU0@U0@@Z"(ptr {{.*}}, ptr sret(%struct.LoadableIntWrapper) %[[OPRESULT]], i64

0 commit comments

Comments
 (0)