Skip to content

[Serialization] Serialize hasCReferences to keep linkage #33662

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
Sep 1, 2020

Conversation

kateinoigakukun
Copy link
Member

hasCReferences is used to determine that the function is externally
available. If a function has @_cdecl and not used from anywhere in Swift
side code, it will be emitted due to its hasCReferences. But if the
attribute is not restored from sib, it won't be emitted even if it's
used externally. So we need to serialize the attribute.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@nkcsgexi nkcsgexi requested a review from xymus August 27, 2020 18:05
Copy link
Contributor

@xymus xymus left a comment

Choose a reason for hiding this comment

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

This looks good, thank you! Can you fix the conflict so we can launch the tests?

hasCReferences is used to determine that the function is externally
available. If a function has @_cdecl and not used from anywhere in Swift
side code, it will be emitted due to its hasCReferences. But if the
attribute is not restored from sib, it won't be emitted even if it's
used externally. So we need to serialize the attribute.
@kateinoigakukun kateinoigakukun force-pushed the katei/serialize-has-cref branch from ec1589c to 992c383 Compare August 28, 2020 17:22
@kateinoigakukun
Copy link
Member Author

@xymus Thanks for review! I rebased this branch 👍

@xymus
Copy link
Contributor

xymus commented Aug 28, 2020

@swift-ci Please smoke test

@kateinoigakukun
Copy link
Member Author

Hmm, it seems linux CI failure is not related to this change. Could you trigger again?

@xymus
Copy link
Contributor

xymus commented Aug 31, 2020

@swift-ci Please smoke test

@xymus
Copy link
Contributor

xymus commented Aug 31, 2020

@swift-ci Please test Linux platform

@xymus xymus merged commit 413eba8 into swiftlang:master Sep 1, 2020
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