diff options
author | Enrico Granata <egranata@apple.com> | 2015-01-28 00:07:51 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2015-01-28 00:07:51 +0000 |
commit | 1cd5e921e1011a31ca1de57444b0649a921ccf33 (patch) | |
tree | cd3cfcdd9c8e8afa56132e8e00f1579bb45fb9e5 /lldb/source/Core/ValueObject.cpp | |
parent | b06fe2a704e5132b53f3826823c37caafe5dc23b (diff) | |
download | bcm5719-llvm-1cd5e921e1011a31ca1de57444b0649a921ccf33.tar.gz bcm5719-llvm-1cd5e921e1011a31ca1de57444b0649a921ccf33.zip |
Preparatory infrastructural work to support dynamically determining sizes of ObjC types via the runtime
This is necessary because the byte size of an ObjC class type is not reliably statically knowable (e.g. because superclasses sit deep in frameworks that we have no debug info for)
The lack of reliable size info is a problem when trying to freeze-dry an ObjC instance (not the pointer, the pointee)
This commit lays the foundation for having language runtimes help in figuring out byte sizes, and having ClangASTType ask for runtime help
No feature change as no runtime actually implements the logic, and nowhere is an ExecutionContext passed in yet
llvm-svn: 227274
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r-- | lldb/source/Core/ValueObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 3937424ed7e..99b38dd6264 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -971,7 +971,7 @@ ValueObject::GetPointeeData (DataExtractor& data, if (item_count == 0) return 0; - const uint64_t item_type_size = pointee_or_element_clang_type.GetByteSize(); + const uint64_t item_type_size = pointee_or_element_clang_type.GetByteSize(nullptr); const uint64_t bytes = item_count * item_type_size; const uint64_t offset = item_idx * item_type_size; @@ -1047,7 +1047,7 @@ ValueObject::GetPointeeData (DataExtractor& data, break; case eAddressTypeHost: { - const uint64_t max_bytes = GetClangType().GetByteSize(); + const uint64_t max_bytes = GetClangType().GetByteSize(nullptr); if (max_bytes > offset) { size_t bytes_read = std::min<uint64_t>(max_bytes - offset, bytes); @@ -2225,7 +2225,7 @@ ValueObject::GetSyntheticChildAtOffset(uint32_t offset, const ClangASTType& type ValueObjectChild *synthetic_child = new ValueObjectChild(*this, type, name_const_str, - type.GetByteSize(), + type.GetByteSize(nullptr), offset, 0, 0, @@ -2266,7 +2266,7 @@ ValueObject::GetSyntheticBase (uint32_t offset, const ClangASTType& type, bool c ValueObjectChild *synthetic_child = new ValueObjectChild(*this, type, name_const_str, - type.GetByteSize(), + type.GetByteSize(nullptr), offset, 0, 0, |