diff options
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp b/contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp index c86bece42eb8..389b7c54243d 100644 --- a/contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp +++ b/contrib/llvm/tools/lldb/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) |