-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[cxx-interop] Unconditionally apply @_addressable for C++ functions
#82879
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
egorzhdan
merged 1 commit into
swiftlang:main
from
egorzhdan:egorzhdan/always-addressable
Jul 25, 2025
Merged
[cxx-interop] Unconditionally apply @_addressable for C++ functions
#82879
egorzhdan
merged 1 commit into
swiftlang:main
from
egorzhdan:egorzhdan/always-addressable
Jul 25, 2025
Conversation
This file contains hidden or 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
Contributor
Author
|
@swift-ci please smoke test |
Xazax-hun
approved these changes
Jul 8, 2025
f87ea28 to
c727cfb
Compare
Contributor
Author
|
@swift-ci please smoke test |
c727cfb to
4ed9bd9
Compare
Contributor
Author
|
@swift-ci please smoke test |
4ed9bd9 to
3da89f4
Compare
Contributor
Author
|
@swift-ci please smoke test |
3da89f4 to
e71b87c
Compare
e71b87c to
93be49e
Compare
Contributor
Author
|
@swift-ci please smoke test |
93be49e to
5700d8e
Compare
Contributor
Author
|
@swift-ci please smoke test |
5700d8e to
3a48b2b
Compare
Contributor
Author
|
@swift-ci please smoke test |
Xazax-hun
reviewed
Jul 24, 2025
3a48b2b to
57a876d
Compare
Contributor
Author
|
@swift-ci please smoke test |
ClangImporter was importing C++ decls inconsistently when the experimental AddressableParameters feature is enabled vs disabled. This caused deserialization issues if a dependency module was build without AddressableParameters, but a client module enables them. rdar://155319311 Co-authored-by: Gabor Horvath <[email protected]>
57a876d to
cd58e65
Compare
Contributor
Author
|
@swift-ci please test |
Contributor
Author
|
@swift-ci please build toolchain Ubuntu 24.04 |
Contributor
Author
|
@swift-ci please build toolchain Amazon Linux |
Contributor
Author
|
@swift-ci please build toolchain Amazon Linux 2 |
Xazax-hun
pushed a commit
to Xazax-hun/swift
that referenced
this pull request
Aug 18, 2025
After swiftlang#83289 and swiftlang#82879 landed we should no longer get deserialization failures and this feature is no longer behind a flag. This patch also changes how we query if a function's return value depends on self. Previously, we queried the lifetime dependencies from the Swift declaration. Unfortunately, this is problematic as we might have not finished fully importing the types in the function signature just yet and the compiler might end up populating the conformance tables prematurely. To work this around, I store functions with self-dependent return values where lifetimes are computed in the importer for later use. The PR also adds a test to make sure the addressable dependency feature will not result in deserialization errors. rdar://155319311&154213694&112690482&128293252
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.
ClangImporter was importing C++ decls inconsistently when the experimental AddressableParameters feature is enabled vs disabled. This caused deserialization issues if a dependency module was build without AddressableParameters, but a client module enables them.
rdar://155319311