Skip to content

[cxx-interop] SWIFT_RETURNS_INDEPENDENT_VALUE implies immortal lifetime #77294

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 1 commit into from
Oct 31, 2024

Conversation

Xazax-hun
Copy link
Contributor

@Xazax-hun Xazax-hun commented Oct 30, 2024

The semantics of returning independent value already matches what immortal lifetimes are within Swift. This patch makes sure this annotation works as expected with non-escapable types.

rdar://137671642

@Xazax-hun Xazax-hun added the c++ interop Feature: Interoperability with C++ label Oct 30, 2024
@Xazax-hun Xazax-hun changed the title [cxx-interop] Make SWIFT_RETURNS_INDEPENDENT_VALUE imply immortal lif… [cxx-interop] SWIFT_RETURNS_INDEPENDENT_VALUE implies immortal lifetime Oct 30, 2024
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems very reasonable, LGTM!

…etime

The semantics of returning independent value already matches what
immortal lifetimes are within Swift. This patch makes sure this
annotation works as expected with non-escapable types.

rdar://137671642
@Xazax-hun Xazax-hun force-pushed the gaborh/import-return-independent-as-immortal branch from 40d7fcf to 17ef2f6 Compare October 30, 2024 15:35
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test windows

@Xazax-hun Xazax-hun enabled auto-merge October 31, 2024 11:07
@Xazax-hun Xazax-hun merged commit 217b450 into main Oct 31, 2024
3 checks passed
@Xazax-hun Xazax-hun deleted the gaborh/import-return-independent-as-immortal branch October 31, 2024 14:53
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.

2 participants