Skip to content

Disable loading scalars as addresses when materializing an entity variable #1452

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions lldb/source/Expression/Materializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,16 +412,14 @@ class EntityVariable : public Materializer::Entity {
public:
EntityVariable(lldb::VariableSP &variable_sp)
: Entity(), m_variable_sp(variable_sp), m_is_reference(false),
m_is_generic(false), m_temporary_allocation(LLDB_INVALID_ADDRESS),
m_temporary_allocation(LLDB_INVALID_ADDRESS),
m_temporary_allocation_size(0) {
// Hard-coding to maximum size of a pointer since all variables are
// materialized by reference
m_size = 8;
m_alignment = 8;
m_is_reference =
m_variable_sp->GetType()->GetForwardCompilerType().IsReferenceType();
m_is_generic = SwiftASTContext::IsGenericType(
m_variable_sp->GetType()->GetForwardCompilerType());
}

void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map,
Expand Down Expand Up @@ -793,7 +791,6 @@ class EntityVariable : public Materializer::Entity {
private:
lldb::VariableSP m_variable_sp;
bool m_is_reference;
bool m_is_generic;
lldb::addr_t m_temporary_allocation;
size_t m_temporary_allocation_size;
lldb::DataBufferSP m_original_data;
Expand Down