Skip to content

[4.0jun23] [Type checker] Always record used conformances in the source file. #10641

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

Conversation

DougGregor
Copy link
Member

Explanation: An early exit introduced in PR #10292 meant that we would only record
a protocol conformance as "used" in the first file in which we saw a
reference to the conformance. Make sure we record the conformance as
used in each source file that needs it.
Scope: Ensures that we emit synthesized protocol conformances that are needed in each source file. No impact on source compatibility.
Radar: rdar://problem/32978891 and rdar://problem/32980176
Risk: Zero. We're emitting some witness tables/protocol conformances that were getting dropped earlier.
Testing: Compiler regression testing, building several projects that broke due to this bug.

An early exit introduced in PR swiftlang#10292 meant that we would only record
a protocol conformance as "used" in the first file in which we saw a
reference to the conformance. Make sure we record the conformance as
used in each source file that needs it. Fixes rdar://problem/32978891
and rdar://problem/32980176.

(cherry picked from commit 8246367)
(cherry picked from commit c12e784)
@DougGregor
Copy link
Member Author

@swift-ci please test and merge

@DougGregor DougGregor merged commit 753dcc2 into swiftlang:swift-4.0-branch-06-23-2017 Jun 28, 2017
@DougGregor DougGregor deleted the record-conformance-in-source-file-4.0jun23 branch June 28, 2017 04:06
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.

1 participant