summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObject.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-01-28 01:09:45 +0000
committerEnrico Granata <egranata@apple.com>2015-01-28 01:09:45 +0000
commit951bdd5f4121d406bb043e3c2df0b42b737af263 (patch)
treebc8e863c0b1e596e48e9557d80293d9004fcb6f2 /lldb/source/Core/ValueObject.cpp
parent65b0e7630db3b0eb5c940150eccd55fb797e51bc (diff)
downloadbcm5719-llvm-951bdd5f4121d406bb043e3c2df0b42b737af263.tar.gz
bcm5719-llvm-951bdd5f4121d406bb043e3c2df0b42b737af263.zip
Move several GetByteSize() calls over to the brave new world of taking an ExecutionContext*
And since enough of these are doing the right thing, add a test case to verify we are doing the right thing with freeze drying ObjC object types Fixes rdar://18092770 llvm-svn: 227282
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r--lldb/source/Core/ValueObject.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 99b38dd6264..b72e5c3f18c 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -971,7 +971,9 @@ ValueObject::GetPointeeData (DataExtractor& data,
if (item_count == 0)
return 0;
- const uint64_t item_type_size = pointee_or_element_clang_type.GetByteSize(nullptr);
+ ExecutionContext exe_ctx (GetExecutionContextRef());
+
+ const uint64_t item_type_size = pointee_or_element_clang_type.GetByteSize(&exe_ctx);
const uint64_t bytes = item_count * item_type_size;
const uint64_t offset = item_idx * item_type_size;
@@ -1047,7 +1049,7 @@ ValueObject::GetPointeeData (DataExtractor& data,
break;
case eAddressTypeHost:
{
- const uint64_t max_bytes = GetClangType().GetByteSize(nullptr);
+ const uint64_t max_bytes = GetClangType().GetByteSize(&exe_ctx);
if (max_bytes > offset)
{
size_t bytes_read = std::min<uint64_t>(max_bytes - offset, bytes);
@@ -2222,10 +2224,12 @@ ValueObject::GetSyntheticChildAtOffset(uint32_t offset, const ClangASTType& type
if (!can_create)
return ValueObjectSP();
+ ExecutionContext exe_ctx (GetExecutionContextRef());
+
ValueObjectChild *synthetic_child = new ValueObjectChild(*this,
type,
name_const_str,
- type.GetByteSize(nullptr),
+ type.GetByteSize(&exe_ctx),
offset,
0,
0,
@@ -2263,10 +2267,12 @@ ValueObject::GetSyntheticBase (uint32_t offset, const ClangASTType& type, bool c
const bool is_base_class = true;
+ ExecutionContext exe_ctx (GetExecutionContextRef());
+
ValueObjectChild *synthetic_child = new ValueObjectChild(*this,
type,
name_const_str,
- type.GetByteSize(nullptr),
+ type.GetByteSize(&exe_ctx),
offset,
0,
0,
OpenPOWER on IntegriCloud