-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Avoid querying layout of dependent types during symbolic import #81228
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
@swift-ci please test |
I'm also going to re-enable the benchmarks that were disabled in #81145. |
…c import In swiftlang#80786, we started importing certain padded fields as opaque blobs. Part of this logic involved querying those fields' ASTRecordLayout. However, dependent types (which are imported symbolically) do not have an ASTRecordLayout, so calling Clang's getASTRecordLayout() would lead to an assertion error for class templates where a no_unique_address field is some kind of dependent C++ record type. This patch avoids the field padding check during symbolic import mode because that check is only relevant for codegen anyway. rdar://150067288
…k from the build (swiftlang#81145)" This reverts commit 86c30d6.
4818e7e
to
ff596d5
Compare
@swift-ci please test |
@swift-ci please benchmark |
@swift-ci please benchmark linux platform |
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.
Awesome, thanks!
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.
Looks great! Thanks for fixing this in my absence!
In #80786, we started importing certain padded fields as opaque blobs.
Part of this logic involved querying those fields' ASTRecordLayout.
However, dependent types (which are imported symbolically) do not have
an ASTRecordLayout, so calling Clang's getASTRecordLayout() would lead
to an assertion error for class templates where a no_unique_address
field is some kind of dependent C++ record type.
This PR includes a patch that avoids the field padding check during symbolic import mode
because that check is only relevant for codegen anyway.
This PR also includes some small test case updates to increase coverage of padded fields other than
std::optional
.rdar://150067288