[5.5] async function pointer support for Windows #40147
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm nominating this for Swift 5.5 on behalf of my team (XCTest) and the original PR author (@compnerd), since it supports Swift async test support. Our XCTest release manager @bcroom is out on vacation currently, but he approved this via Slack.
Explanation: This fixes an issue leading to linker failures with open async functions on Windows. For detailed summary of the problem, see the original PR (IRGen: initial pass to support
async
inheritance on Windows #39998). The motivation for bringing it back to 5.5 is that this is one PR of several which support async XCTests, since this problem was identified as a blocker to landing the Corelibs XCTest changes for Windows.Scope: Limited. Affects code which has adopted async on Windows, and uses subclassing.
SR Issue: SR-15399
Risk: Low, only affecting PE/COFF (Windows), relatively new code which has adopted async, under narrow circumstances.
Testing: New unit tests are included, it passes existing tests and smoke tests as well. Change has been on main for 2 weeks without issue. Also resolves an existing XFAIL’ed test on Windows.
Reviewer: @aschwaighofer