summaryrefslogtreecommitdiff
path: root/source/Core/ValueObjectVariable.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
commite81d9d49145e432d917eea3a70d2ae74dcad1d89 (patch)
tree9ed5e1a91f242e2cb5911577356e487a55c01b78 /source/Core/ValueObjectVariable.cpp
parent85d8ef8f1f0e0e063a8571944302be2d2026f823 (diff)
Notes
Diffstat (limited to 'source/Core/ValueObjectVariable.cpp')
-rw-r--r--source/Core/ValueObjectVariable.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/source/Core/ValueObjectVariable.cpp b/source/Core/ValueObjectVariable.cpp
index c86bece42eb89..389b7c54243db 100644
--- a/source/Core/ValueObjectVariable.cpp
+++ b/source/Core/ValueObjectVariable.cpp
@@ -54,13 +54,13 @@ ValueObjectVariable::~ValueObjectVariable()
{
}
-ClangASTType
-ValueObjectVariable::GetClangTypeImpl ()
+CompilerType
+ValueObjectVariable::GetCompilerTypeImpl ()
{
Type *var_type = m_variable_sp->GetType();
if (var_type)
- return var_type->GetClangForwardType();
- return ClangASTType();
+ return var_type->GetForwardCompilerType ();
+ return CompilerType();
}
ConstString
@@ -77,7 +77,7 @@ ValueObjectVariable::GetDisplayTypeName()
{
Type * var_type = m_variable_sp->GetType();
if (var_type)
- return var_type->GetClangForwardType().GetDisplayTypeName();
+ return var_type->GetForwardCompilerType ().GetDisplayTypeName();
return ConstString();
}
@@ -91,15 +91,16 @@ ValueObjectVariable::GetQualifiedTypeName()
}
size_t
-ValueObjectVariable::CalculateNumChildren()
+ValueObjectVariable::CalculateNumChildren(uint32_t max)
{
- ClangASTType type(GetClangType());
+ CompilerType type(GetCompilerType());
if (!type.IsValid())
return 0;
const bool omit_empty_base_classes = true;
- return type.GetNumChildren(omit_empty_base_classes);
+ auto child_count = type.GetNumChildren(omit_empty_base_classes);
+ return child_count <= max ? child_count : max;
}
uint64_t
@@ -107,7 +108,7 @@ ValueObjectVariable::GetByteSize()
{
ExecutionContext exe_ctx(GetExecutionContextRef());
- ClangASTType type(GetClangType());
+ CompilerType type(GetCompilerType());
if (!type.IsValid())
return 0;
@@ -168,15 +169,15 @@ ValueObjectVariable::UpdateValue ()
m_resolved_value = m_value;
m_value.SetContext(Value::eContextTypeVariable, variable);
- ClangASTType clang_type = GetClangType();
- if (clang_type.IsValid())
- m_value.SetClangType(clang_type);
+ CompilerType compiler_type = GetCompilerType();
+ if (compiler_type.IsValid())
+ m_value.SetCompilerType(compiler_type);
Value::ValueType value_type = m_value.GetValueType();
Process *process = exe_ctx.GetProcessPtr();
const bool process_is_alive = process && process->IsAlive();
- const uint32_t type_info = clang_type.GetTypeInfo();
+ const uint32_t type_info = compiler_type.GetTypeInfo();
const bool is_pointer_or_ref = (type_info & (lldb::eTypeIsPointer | lldb::eTypeIsReference)) != 0;
switch (value_type)