Skip to content

[cxx-interop] Lazily load the result of imported functions. #39134

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
Sep 9, 2021

Conversation

zoecarver
Copy link
Contributor

Note: we only lazily load the result if it's a record, because otherwise it's trivial to load when importing the function. Also, we still eagerly import operator's results types.

Same as the other two patches wrt using Never if the type fails to import.

@zoecarver zoecarver added the c++ interop Feature: Interoperability with C++ label Sep 2, 2021
@zoecarver
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.

Looks good! I only have one minor comment.

Note: we only lazily load the result if it's a record, because otherwise it's trivial to load when importing the function. Also, we still eagerly import operator's results types.
@zoecarver zoecarver force-pushed the lazy-load-function-result-type branch from d8af7d5 to 6e9bf50 Compare September 9, 2021 00:49
@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test and merge.

@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test.

@zoecarver zoecarver merged commit f2f8bac into swiftlang:main Sep 9, 2021
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.

3 participants