Skip to content

IRGen: Initialize single case enum extrainhabitant value witness in generated code #24293

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

Conversation

aschwaighofer
Copy link
Contributor

Older Swift runtimes miss this initialization in the swift_initEnumMetadataSingleCase runtime call.

rdar://49786768

…nerated code

Older Swift runtimes miss this initialization in the swift_initEnumMetadataSingleCase runtime call.

rdar://49786768
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@aschwaighofer
Copy link
Contributor Author

Compiler fix for #24278

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - e2d3f53

@bob-wilson
Copy link
Contributor

Should we do this conditionally based on the deployment target or is it cheap enough to just do it all the time?

@aschwaighofer
Copy link
Contributor Author

Cheap: This is a single load/store that is executed only once per type initialization (once per program run) of a single case enum type.

We could conditionalize this on a deployment target in the future. I don’t know that we have deployment target support plumped through the compiler. It would not be worth to do it for this.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e2d3f53

@bob-wilson
Copy link
Contributor

OK, that sounds fine then.

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e2d3f53

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - e2d3f53

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test os x

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 161ff34

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test os x

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.

3 participants