Skip to content

[5.9] IRGen: fix async vtable stubs #65947

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

eeckstein
Copy link
Contributor

@eeckstein eeckstein commented May 16, 2023

Description: For deleted async vtable methods we need to create a async function pointer. If the optimizer removes a private class method, its symbol must still be generated in the binary, because derived classes in other translation units must be able to reference the symbol in the vtable of the derived class.
This all worked with regular methods, but we didn't do that for async methods.
It fixes a missing-symbol linker error.
Risk: Low. It only affects private async class methods which are removed by the optimizer. Generated code, which is actually executed, is not affected. The only change is to create the missing symbol in the binary.
Reviewed by: @nate-chandler
Testing: CI testing via lit tests
Original PR: #65940
Radar: rdar://108924001

For deleted async vtable methods we need to create a async function pointer.

Fixes a missing-symbol linker error
rdar://108924001
@eeckstein eeckstein requested a review from a team as a code owner May 16, 2023 14:46
@eeckstein
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@nate-chandler nate-chandler 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 1de0c05 into swiftlang:release/5.9 May 17, 2023
@eeckstein eeckstein deleted the fix-dead-async-methods-5.9 branch May 17, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants