Skip to content

Test C++ out-of-line operator functions #32081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 3, 2020
Merged

Test C++ out-of-line operator functions #32081

merged 6 commits into from
Jun 3, 2020

Conversation

MForster
Copy link
Contributor

@MForster MForster commented May 29, 2020

Add a test to verify that C++ out-of-line operator functions are imported correctly.

This is part of addressing SR-12748.

Add a test to verify that C++ out-of-line operator functions are
imported correctly.
@MForster MForster self-assigned this May 29, 2020
@MForster MForster added the c++ interop Feature: Interoperability with C++ label May 29, 2020
@MForster
Copy link
Contributor Author

@swift-ci Please test

@gribozavr
Copy link
Contributor

Could you add SILGen and IRGen tests for just one of the operators?

@MForster
Copy link
Contributor Author

Could you add SILGen and IRGen tests for just one of the operators?

Done.

@MForster
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@gribozavr
Copy link
Contributor

@swift-ci Please test

@swiftlang swiftlang deleted a comment from swift-ci May 29, 2020
@gribozavr
Copy link
Contributor

@swift-ci Please test Windows

@gribozavr
Copy link
Contributor

@swift-ci Please test

@gribozavr
Copy link
Contributor

@MForster Please update the tests to pass with MSVC mangled names on Windows.

@swiftlang swiftlang deleted a comment from swift-ci Jun 2, 2020
@swiftlang swiftlang deleted a comment from swift-ci Jun 2, 2020
@MForster
Copy link
Contributor Author

MForster commented Jun 2, 2020

@swift-ci Please test

@swiftlang swiftlang deleted a comment from swift-ci Jun 2, 2020
@swiftlang swiftlang deleted a comment from swift-ci Jun 2, 2020
@swiftlang swiftlang deleted a comment from swift-ci Jun 2, 2020
@swiftlang swiftlang deleted a comment from swift-ci Jun 2, 2020
@swift-ci
Copy link
Contributor

swift-ci commented Jun 2, 2020

Build failed
Swift Test OS X Platform
Git Sha - 176d7c4

This is apparently required for the Mac tests.
@swiftlang swiftlang deleted a comment from swift-ci Jun 2, 2020
@swift-ci
Copy link
Contributor

swift-ci commented Jun 2, 2020

Build failed
Swift Test Linux Platform
Git Sha - 6c5da9e

@MForster
Copy link
Contributor Author

MForster commented Jun 3, 2020

@swift-ci Please test Windows Platform

@MForster MForster merged commit f7473a7 into swiftlang:master Jun 3, 2020
@MForster MForster deleted the m/op/out-of-line branch June 3, 2020 08:37
@aschwaighofer
Copy link
Contributor

@MForster Hi Michael, the test:

Interop/Cxx/operators/non-member-out-of-line-irgen.swift

fails on armv7 on this bot https://ci.swift.org/job/oss-swift_tools-RA_stdlib-DA_test-device-non_executable/104

@MForster
Copy link
Contributor Author

MForster commented Jun 4, 2020

Sorry for the breakage. Reverting.

@aschwaighofer
Copy link
Contributor

The output on armv7 is

  %12 = call i32 @_Zpl6IntBoxS_([1 x i32] %6, [1 x i32] %10)

arm64 (coercion to i64 happens before that):

  %12 = call i64 @_Zpl6IntBoxS_(i64 %6, i64 %10)

The quickest way to run these tests on different architectures if you have access to a mac OS X machine is to invoke the build script with --ios --watchos --reconfigure and invoke lit directly:

.../llvm-project/llvm/utils/lit/lit.py -sv --param swift_test_mode=only_non_executable ./build-master/swift-macosx-x86_64/test-iphoneos-armv7/Interop/Cxx/operators/non-member-out-of-line-irgen.swift
.../llvm-project/llvm/utils/lit/lit.py -sv --param swift_test_mode=only_non_executable ./build-master/swift-macosx-x86_64/test-iphoneos-arm64/Interop/Cxx/operators/non-member-out-of-line-irgen.swift
.../llvm-project/llvm/utils/lit/lit.py -sv --param swift_test_mode=only_non_executable ./build-master/swift-macosx-x86_64/test-watchos-armv7k/Interop/Cxx/operators/non-member-out-of-line-irgen.swift

MForster added a commit that referenced this pull request Jun 4, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
This reverts commit f7473a7.
@MForster
Copy link
Contributor Author

MForster commented Jun 4, 2020

Thanks, Arnold. This is very helpful. I was able to fix armv7 before I saw your reply, but arm64 would have been another roundtrip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants