Skip to content
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

[6.1] SIL: Always give @_silgen_name forward declarations public linkage #78188

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Dec 14, 2024

  • Explanation: When @_silgen_name is applied to a function with no body, it is a forward declaration. It therefore must be treated as an external (public) declaration regardless of the access level it was given in source. The stdlib/Error.swift test case revealed that the previously incorrect linkage computation was resulting in potentially unavailable forward declarations being strongly linked when they should be weakly linked.
  • Scope: Addresses a test failure in certain configurations. This test failure is indicative of a problem that could affect real uses of @_silgen_name forward declarations.
  • Issue/Radar: rdar://141436934
  • Original PR: SIL: Always give @_silgen_name forward declarations public linkage #78183
  • Risk: Low. @_silgen_name forward declarations are not used much outside of the standard library and compiler test suite.
  • Testing: New tests in the test suite.
  • Reviewer: @DougGregor

When `@_silgen_name` is applied to a function with no body, it is a forward
declaration. It therefore must be treated as an external (public) declaration
regardless of the access level it was given in source.

Resolves rdar://141436934.
@tshortli tshortli requested a review from a team as a code owner December 14, 2024 18:26
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli merged commit 09efe03 into swiftlang:release/6.1 Dec 15, 2024
5 checks passed
@tshortli tshortli deleted the silgen-name-linkage-6.1 branch December 15, 2024 17:53
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