-
Notifications
You must be signed in to change notification settings - Fork 10.6k
IRGen/ABI: fix count of requirements in getAddrOfGenericEnvironment #85450
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
|
|
||
| // Generic requirements | ||
| irgen::addGenericRequirements(*this, fields, signature); | ||
| irgen::addGenericRequirements(*this, fields, signature, reqs, inverses); |
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.
Do the other callers of the three-argument overload need to be audited to see if they need the same fix? Maybe it should be removed?
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.
Removing it is probably a good idea; it's too easy to misuse the 3-argument version.
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.
Yeah I can do that.
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.
I think it's worth doing the auditing in a follow-up PR. I didn't see any other obvious mistakes in other callers of the 3 argument version.
|
@swift-ci smoke test macOS |
1 similar comment
|
@swift-ci smoke test macOS |
|
@swift-ci test |
`irgen::addGenericRequirements` will later filter out Copyable and Escapable requirements, so this field's count isn't accurate if it's using the pre-filtered number. This should in theory only affect the metadata emission for keypaths, specifically, the caller `IRGenModule::getAddrOfKeyPathPattern`.
fb06e8b to
38af19b
Compare
|
@swift-ci test |
irgen::addGenericRequirementswill later filter out Copyable and Escapable requirements, so this field's count isn't accurate if it's using the pre-filtered number.This should in theory only affect the metadata emission for keypaths, specifically, the caller
IRGenModule::getAddrOfKeyPathPattern.NOTE: This is an ABI change, as any keypath formed using a generic type that conforms to a noncopyable or nonescapable protocol will have its count of conformance requirements change to a corrected, smaller number.