-
Notifications
You must be signed in to change notification settings - Fork 341
Remove bypass of GetAddressOf when dealing with dynamic class types in variable materialization #1455
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
Remove bypass of GetAddressOf when dealing with dynamic class types in variable materialization #1455
Conversation
…n variable materialization
139ea41
to
5b66545
Compare
@@ -489,19 +489,12 @@ class EntityVariable : public Materializer::Entity { | |||
} | |||
} else { | |||
AddressType address_type = eAddressTypeInvalid; | |||
const bool is_dynamic_class_type = | |||
m_is_generic && |
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.
Q: Is m_is_generic
dead code after this?
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 left scalar_is_load_address = m_is_generic
since I though the changes should be independent, but after removing that m_is_generic
is indeed dead code!
@swift-ci test |
Just to clarify: This brings the code in sync with llvm.org again? |
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.
This is great. The fewer swift-lldb-specific changes we need, the better!
@adrian-prantl I didn't include the change of I'm not sure if you're asking if the code following that is the same as well, so here are the differences I found for the rest of the function:
|
I think this one is strictly necessary. IIRC, it is to support global resilient values.
I added support for zero-sized types to llvm.org's lldb ~1 year ago, maybe this is no longer necessary, or could be upstreamed.
That is also necessary. In many cases we need to ask GetByteSize() to the Swift runtime, and we can only do that with an ExecutionContext. We should eventually upstream this change. Thanks for the analysis! |
@adrian-prantl @vedantk