summaryrefslogtreecommitdiffstats
path: root/source/Core/ValueObjectCast.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
committerdim <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
commit66b75430a93929d6fc6ed63db14ca28e3ad5b1f6 (patch)
tree9ed5e1a91f242e2cb5911577356e487a55c01b78 /source/Core/ValueObjectCast.cpp
parent23814158e5384f73c6fa951b66d5f807f9c24a2b (diff)
downloadFreeBSD-src-66b75430a93929d6fc6ed63db14ca28e3ad5b1f6.zip
FreeBSD-src-66b75430a93929d6fc6ed63db14ca28e3ad5b1f6.tar.gz
Vendor import of stripped lldb trunk r256633:
https://llvm.org/svn/llvm-project/lldb/trunk@256633
Diffstat (limited to 'source/Core/ValueObjectCast.cpp')
-rw-r--r--source/Core/ValueObjectCast.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/source/Core/ValueObjectCast.cpp b/source/Core/ValueObjectCast.cpp
index b20371b..1c5838b 100644
--- a/source/Core/ValueObjectCast.cpp
+++ b/source/Core/ValueObjectCast.cpp
@@ -20,14 +20,13 @@
#include "lldb/Core/Value.h"
#include "lldb/Core/ValueObject.h"
-#include "lldb/Symbol/ClangASTType.h"
+#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/Variable.h"
#include "lldb/Target/ExecutionContext.h"
-#include "lldb/Target/LanguageRuntime.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/Target.h"
@@ -38,7 +37,7 @@ using namespace lldb_private;
lldb::ValueObjectSP
ValueObjectCast::Create (ValueObject &parent,
const ConstString &name,
- const ClangASTType &cast_type)
+ const CompilerType &cast_type)
{
ValueObjectCast *cast_valobj_ptr = new ValueObjectCast (parent, name, cast_type);
return cast_valobj_ptr->GetSP();
@@ -48,36 +47,38 @@ ValueObjectCast::ValueObjectCast
(
ValueObject &parent,
const ConstString &name,
- const ClangASTType &cast_type
+ const CompilerType &cast_type
) :
ValueObject(parent),
m_cast_type (cast_type)
{
SetName (name);
//m_value.SetContext (Value::eContextTypeClangType, cast_type.GetOpaqueQualType());
- m_value.SetClangType (cast_type);
+ m_value.SetCompilerType (cast_type);
}
ValueObjectCast::~ValueObjectCast()
{
}
-ClangASTType
-ValueObjectCast::GetClangTypeImpl ()
+CompilerType
+ValueObjectCast::GetCompilerTypeImpl ()
{
return m_cast_type;
}
size_t
-ValueObjectCast::CalculateNumChildren()
+ValueObjectCast::CalculateNumChildren(uint32_t max)
{
- return GetClangType().GetNumChildren (true);
+ auto children_count = GetCompilerType().GetNumChildren (true);
+ return children_count <= max ? children_count : max;
}
uint64_t
ValueObjectCast::GetByteSize()
{
- return m_value.GetValueByteSize(NULL);
+ ExecutionContext exe_ctx (GetExecutionContextRef());
+ return m_value.GetValueByteSize(nullptr, &exe_ctx);
}
lldb::ValueType
@@ -98,9 +99,9 @@ ValueObjectCast::UpdateValue ()
Value old_value(m_value);
m_update_point.SetUpdated();
m_value = m_parent->GetValue();
- ClangASTType clang_type (GetClangType());
- //m_value.SetContext (Value::eContextTypeClangType, clang_type);
- m_value.SetClangType (clang_type);
+ CompilerType compiler_type (GetCompilerType());
+ //m_value.SetContext (Value::eContextTypeClangType, compiler_type);
+ m_value.SetCompilerType (compiler_type);
SetAddressTypeOfChildren(m_parent->GetAddressTypeOfChildren());
if (!CanProvideValue())
{
OpenPOWER on IntegriCloud