-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Setup code for Clang types in SIL. #33541
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
Setup code for Clang types in SIL. #33541
Conversation
1b84f8f to
fd6df87
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4b629f7 to
520db9f
Compare
|
Rebased on top of master to unblock later PR. @swift-ci please smoke test |
include/swift/AST/ExtInfo.h
Outdated
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.
Assert that diffKind fits inside DifferentiabilityMask?
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.
Hmm, should we do this consistently for all the fields? For example, representation takes two bits. I imagine we could have a Last = 3 case there (and a Last = 2 case for DifferentiabilityKind) and then have a static_assert(std::bit_width(DifferentiabilityKind::Last) == std::bit_width(DifferentiabilityMask)).
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.
(Leaving this open for discussion. Will fix this in a follow-up PR based on what you think about the question ^.)
520db9f to
d70182e
Compare
This comment has been minimized.
This comment has been minimized.
This translation is a pre-requisite to storing Clang types in SILFunctionType.
d70182e to
3f39e8a
Compare
This comment has been minimized.
This comment has been minimized.
3f39e8a to
f11ddd6
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
We could've stored a function pointer or a block pointer or a function reference.
…ants. Invariants should be checked only when calling build(), not when the builder itself is created.
At all call-sites, the extInfo passed as the third argument is computed directly from the second argument, so we compute it directly in getBridgedFunctionType.
f11ddd6 to
c4ad840
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Random failures on macOS and Linux. 😠 @swift-ci please clean test |
While working on rebasing #33085, I realized that the changes are just too much for one PR. So this is a separate PR breaking out the first two commits + some cleanup.