Skip to content

[clang] Fix missing target info specifier on Global Variable linkage computation #11006

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

Conversation

artemcm
Copy link

@artemcm artemcm commented Jul 15, 2025

A previous change (#10555) added support for querying 'isWeakImported' to be parameterized on the enclosing target version to match 'CheckAvailability' and 'getAvailability'. We missed passing in this parameter in the Clang module code-gen when querying linkage for a global variable. This change adds the missing parameter and removes the default parameter from the query in order to avoid this kind of bug in the future.

Note: A test for this change is added in swiftlang/swift#83075.

Resolves rdar://154677999

…computation

A previous change (swiftlang#10555) added support for querying 'isWeakImported' to be parameterized on the enclosing target version to match 'CheckAvailability' and 'getAvailability'. We missed passing in this parameter in the Clang module code-gen when querying linkage for a global variable. This change adds the missing parameter and removes the default parameter from the query in order to avoid this kind of bug in the future.

Resolves rdar://154677999
@artemcm
Copy link
Author

artemcm commented Jul 15, 2025

@swift-ci test

@artemcm
Copy link
Author

artemcm commented Jul 16, 2025

@swift-ci test macOS platform

@artemcm
Copy link
Author

artemcm commented Jul 16, 2025

@cachemeifyoucan , @akyrtzi this is a follow-up change to #10555 we looked at previously.

Copy link

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

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

Change LGTM. Don't forget next branch.

@artemcm artemcm merged commit 3a14731 into swiftlang:stable/20240723 Jul 17, 2025
3 checks passed
@artemcm artemcm deleted the FixGVLinkageForClangTarget branch July 17, 2025 15:56
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.

2 participants