TDBGen: add a workaround for a workaround for async PWT #64973
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.
When a protocol witness thunk is formed to a serialised protocol containing an
async
function, the async function pointer to the conformance needs to be made public due to a SIL Verifier check failure (reference to a non-fragile function from within a public fragile function). Add a stop-gap solution of rolling an extra emission for a private symbol as a public symbol to avoid the error (the underlying issue has been open for ~6y and counting as of this commit).This was identified by swift-package-manager (#64900).
Thanks to @DougGregor and @aschwaighofer for the discussion on this!
Backporting this to 5.9 to repair the SPM build. The change is pretty isolated and will add an extra item to the interface definition as per TBDGen's view to match the workaround in IRGen/SILGen related to the protocol conformance of serialised interfaces.
Cherry-pick of #64920.