summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-01-28 00:07:51 +0000
committerEnrico Granata <egranata@apple.com>2015-01-28 00:07:51 +0000
commit1cd5e921e1011a31ca1de57444b0649a921ccf33 (patch)
treecd3cfcdd9c8e8afa56132e8e00f1579bb45fb9e5 /lldb/source/DataFormatters
parentb06fe2a704e5132b53f3826823c37caafe5dc23b (diff)
downloadbcm5719-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/DataFormatters')
-rw-r--r--lldb/source/DataFormatters/CXXFormatterFunctions.cpp2
-rw-r--r--lldb/source/DataFormatters/LibCxx.cpp2
-rw-r--r--lldb/source/DataFormatters/LibCxxInitializerList.cpp2
-rw-r--r--lldb/source/DataFormatters/LibCxxVector.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/DataFormatters/CXXFormatterFunctions.cpp b/lldb/source/DataFormatters/CXXFormatterFunctions.cpp
index 04cdadf5a98..5aa8289794c 100644
--- a/lldb/source/DataFormatters/CXXFormatterFunctions.cpp
+++ b/lldb/source/DataFormatters/CXXFormatterFunctions.cpp
@@ -317,7 +317,7 @@ lldb_private::formatters::WCharStringSummaryProvider (ValueObject& valobj, Strea
return false;
ClangASTType wchar_clang_type = ClangASTContext::GetBasicType(ast, lldb::eBasicTypeWChar);
- const uint32_t wchar_size = wchar_clang_type.GetBitSize();
+ const uint32_t wchar_size = wchar_clang_type.GetBitSize(nullptr);
ReadStringAndDumpToStreamOptions options(valobj);
options.SetLocation(data_addr);
diff --git a/lldb/source/DataFormatters/LibCxx.cpp b/lldb/source/DataFormatters/LibCxx.cpp
index 26bbcf91242..33b85322330 100644
--- a/lldb/source/DataFormatters/LibCxx.cpp
+++ b/lldb/source/DataFormatters/LibCxx.cpp
@@ -139,7 +139,7 @@ lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::GetChildAtIndex (si
return ValueObjectSP();
}
bool bit_set = ((byte & mask) != 0);
- DataBufferSP buffer_sp(new DataBufferHeap(m_bool_type.GetByteSize(),0));
+ DataBufferSP buffer_sp(new DataBufferHeap(m_bool_type.GetByteSize(nullptr),0));
if (bit_set && buffer_sp && buffer_sp->GetBytes())
*(buffer_sp->GetBytes()) = 1; // regardless of endianness, anything non-zero is true
StreamString name; name.Printf("[%" PRIu64 "]", (uint64_t)idx);
diff --git a/lldb/source/DataFormatters/LibCxxInitializerList.cpp b/lldb/source/DataFormatters/LibCxxInitializerList.cpp
index e76b0bec95c..91f1f90507a 100644
--- a/lldb/source/DataFormatters/LibCxxInitializerList.cpp
+++ b/lldb/source/DataFormatters/LibCxxInitializerList.cpp
@@ -107,7 +107,7 @@ lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd::Update()
if (kind != lldb::eTemplateArgumentKindType || false == m_element_type.IsValid())
return false;
- m_element_size = m_element_type.GetByteSize();
+ m_element_size = m_element_type.GetByteSize(nullptr);
if (m_element_size > 0)
m_start = m_backend.GetChildMemberWithName(g___begin_,true).get(); // store raw pointers or end up with a circular dependency
diff --git a/lldb/source/DataFormatters/LibCxxVector.cpp b/lldb/source/DataFormatters/LibCxxVector.cpp
index 26c62afbed2..d0e6be486d6 100644
--- a/lldb/source/DataFormatters/LibCxxVector.cpp
+++ b/lldb/source/DataFormatters/LibCxxVector.cpp
@@ -115,7 +115,7 @@ lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::Update()
if (!data_type_finder_sp)
return false;
m_element_type = data_type_finder_sp->GetClangType().GetPointeeType();
- m_element_size = m_element_type.GetByteSize();
+ m_element_size = m_element_type.GetByteSize(nullptr);
if (m_element_size > 0)
{
OpenPOWER on IntegriCloud