Skip to content

IRGen: adjust addressability of the generic metadata #79448

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
Feb 26, 2025

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Feb 17, 2025

When building on Windows, if the nominal base type is in a non-static library, we cannot reference the type descriptor directly. As a load is required, we cannot statically initialise the pattern metadata. Account for this in the addressability computation.

Fixes: #79417

When building on Windows, if the nominal base type is in a non-static
library, we cannot reference the type descriptor directly. As a load is
required, we cannot statically initialise the pattern metadata. Account
for this in the addressability computation.
@compnerd compnerd requested a review from rjmccall as a code owner February 17, 2025 23:04
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test Windows platform

@aschwaighofer
Copy link
Contributor

Seems like a reasonable fix to me. If you can't have statically initialized pre-specialized metadata you can't have it.

(In theory one could come up with a scheme where an accessor function initializes these fields but I don't see the complexity being worth the effort to save what -- the malloc call over memory that has to be dirtied anyway?)

@compnerd compnerd merged commit c7429f0 into swiftlang:main Feb 26, 2025
5 checks passed
@compnerd compnerd deleted the addressability branch February 26, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unresolved symbol: $ss22KeyedEncodingContainerVys15SuspendingClockV7InstantV10CodingKeys33_58ECF69D5494349AC41E7A65FF4864CBLLOGMN
2 participants