Skip to content

Fix two problems with -cross-module-optimization #74893

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 2 commits into from
Jul 2, 2024

Conversation

eeckstein
Copy link
Contributor

@eeckstein eeckstein commented Jul 2, 2024

  • MandatoryPerformanceOptimizations: don't crash with empty global-init-once functions

Instead ignore empty global-init-once functions

  • Deserializer: fix a crash with global variables and cross-module-optimization

In case of cross-module-optimizations it can happen that a private global variable is changed to public,
but it's declaration is not available in the module file.

Fixes #73487
rdar://130406651

eeckstein added 2 commits July 2, 2024 14:03
…-once functions

Instead ignore empty global-init-once functions

swiftlang#73487
rdar://130041582
…mization

In case of cross-module-optimizations it can happen that a private global variable is changed to public,
but it's declaration is not available in the module file.
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein requested review from kubamracek and meg-gupta July 2, 2024 12:12
@eeckstein eeckstein changed the title Fix two problem with -cross-module-optimization Fix two problems with -cross-module-optimization Jul 2, 2024
Copy link
Contributor

@meg-gupta meg-gupta left a comment

Choose a reason for hiding this comment

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

LGTM!

@eeckstein eeckstein merged commit 0a92a23 into swiftlang:main Jul 2, 2024
5 checks passed
@eeckstein eeckstein deleted the fix-cmo-problems branch July 2, 2024 18:01
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.

Swift 5.10 crashing when -cross-module-optimization is enabled
2 participants