<rdar://problem/13925626>

Correctly handle the case of a ValueObjectVariable backed by a Vector

llvm-svn: 182330
This commit is contained in:
Enrico Granata
2013-05-20 22:58:35 +00:00
parent f121b9302e
commit 68ae91cf83
2 changed files with 15 additions and 1 deletions

View File

@@ -342,6 +342,18 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
default:
error.SetErrorStringWithFormat("invalid value type %i", m_value_type);
break;
case eValueTypeVector:
if (m_context_type == eContextTypeClangType && ast_context)
{
ClangASTType ptr_type (ast_context, ClangASTContext::GetVoidPtrType(ast_context, false));
uint64_t ptr_byte_size = ptr_type.GetClangTypeByteSize();
data.SetAddressByteSize (ptr_byte_size);
}
else
data.SetAddressByteSize(sizeof(void *));
data.SetData(m_vector.bytes, m_vector.length, m_vector.byte_order);
break;
case eValueTypeScalar:
data.SetByteOrder (lldb::endian::InlHostByteOrder());