-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[IRGen] Handle ProtocolInfo for protocols whose members aren't used #18692
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
[IRGen] Handle ProtocolInfo for protocols whose members aren't used #18692
Conversation
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please test compiler performance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Build failed |
Build failed |
*sigh* Both silly platform-dependent things that were really rather obvious. |
d73a098
to
293082d
Compare
@swift-ci Please test |
Build failed |
Build failed |
I'm pretty sure those Debug numbers are showing that some projects got fixed, which is what I expected from this change. |
Certain uses of protocols only formally need the requirement signature, not any of the method requirements. This results in IRGen seeing a protocol where none of the members have been validated except the associated types. Account for this by allowing ProtocolInfo to only contain the layout for the base protocols and associated types, if requested. Note that this relies on the layout of a witness table always putting the "requirement signature part" at the front, or at least at offsets that aren't affected by function requirements. rdar://problem/43260117
293082d
to
b21d283
Compare
@swift-ci Please test Linux |
@swift-ci Please smoke test macOS |
Build failed |
Certain uses of protocols only formally need the requirement signature, not any of the method requirements. This results in IRGen seeing a protocol where none of the members have been validated except the associated types. Account for this by allowing ProtocolInfo to only contain the layout for the base protocols and associated types, if requested.
Note that this relies on the layout of a witness table always putting the "requirement signature part" at the front, or at least at offsets that aren't affected by function requirements.
rdar://problem/43260117