-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[cxx-interop][5.9] windows ABI fixes #67442
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…f methods Fixes swiftlang#66326 This allows us to reneable Windows method tests. Note that Windows still has a broken convention for non-trivial record with non-trivial destructor but trivial copy-constructor, so classes in the methods.swift test need an explicit copy constructor. Fixes rdar://88391102
…loadable C++ types as unavailable Windows logic for determining address-only type layout for a C++ type is now unified with other platforms. However, this means that on Windows, a C++ type with a custom destructor, but a default copy constructor is now loadable, even though it's non-trivial. Since Swift does not support such type operations at the moment (it can't be yet destroyed), mark such type as unavailable in Swift instead, when building for the Windows target. This fixes the Windows miscompilation related to such types when they were passed indirectly to C++ functions even though they're actually passed directly.
@swift-ci please test |
hyp
changed the title
[cxx-interop] windows ABI fixes
[cxx-interop][5.9] windows ABI fixes
Jul 20, 2023
DougGregor
approved these changes
Jul 20, 2023
@swift-ci please test windows platform |
@swift-ci please test linux platform |
hyp
force-pushed
the
eng/5.9/windows-almighty
branch
from
July 21, 2023 22:21
aa1906c
to
9b721b2
Compare
@swift-ci please test |
@swift-ci please test source compatibility |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[cxx-interop] Fix the windows ABI for returning indirect values out of methods
[cxx-interop] Windows: unify address-only logic and mark non-trivial loadable C++ types as unavailable
Windows MSVC ABI had two problems with IRGen for calls to C++:
this
and the returned value. This is now fixed, and we get the ordering right for the MSVC ABI.