Skip to content

[SILGen] Fix the type of closure thunks that are passed const reference structs #82486

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Xazax-hun
Copy link
Contributor

This PR is another attempt at landing #76903. The changes compared to the original PR:

  • Instead of increasing the size of SILDeclRef, store the necessary type information in the conversion AST nodes.
  • The PR above introduced a crash during indexing system modules that references foreign types coming from modules imported as implementation only. These entities are implementation details so they do not need to be included during serialization. This PR adds a test and adds logic to exclude such declarations in the serialization process.

rdar://131321096&141786724

@Xazax-hun Xazax-hun force-pushed the gaborh/const-ref-crash branch 2 times, most recently from 90b2629 to e0f7524 Compare June 27, 2025 10:33
…ce structs

This PR is another attempt at landing #76903. The changes compared to
the original PR:
* Instead of increasing the size of SILDeclRef, store the necessary type
  information in the conversion AST nodes.
* The PR above introduced a crash during indexing system modules that
  references foreign types coming from modules imported as
  implementation only. These entities are implementation details so they
  do not need to be included during serialization. This PR adds a test
  and adds logic to exclude such clang types in the serialization
  process.

rdar://131321096&141786724
@Xazax-hun Xazax-hun force-pushed the gaborh/const-ref-crash branch from e0f7524 to 17522c4 Compare June 27, 2025 15:19
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@hnrklssn hnrklssn left a comment

Choose a reason for hiding this comment

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

LGTM, but I'm not really familiar with this stuff so someone else ought to have a look over also

@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test macOS

@Xazax-hun Xazax-hun requested a review from rjmccall June 30, 2025 07:19
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