summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObjectDynamicValue.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-10-29 17:42:02 +0000
committerEnrico Granata <egranata@apple.com>2013-10-29 17:42:02 +0000
commitdf7c7f99baa027b72e4f56b521dd2a6fc7192f90 (patch)
treea9374872c6e22659ddd943d04014c95d226f4235 /lldb/source/Core/ValueObjectDynamicValue.cpp
parente133ed88b56c7960f2424171987729e8f794361f (diff)
downloadbcm5719-llvm-df7c7f99baa027b72e4f56b521dd2a6fc7192f90.tar.gz
bcm5719-llvm-df7c7f99baa027b72e4f56b521dd2a6fc7192f90.zip
Fixing an issue in yesterday's dynamic type changes where we would not craft a valid SBType given debug information
Added a test case to help us detect regression in this realm llvm-svn: 193631
Diffstat (limited to 'lldb/source/Core/ValueObjectDynamicValue.cpp')
-rw-r--r--lldb/source/Core/ValueObjectDynamicValue.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp
index 64f9750434d..ff8a0edb801 100644
--- a/lldb/source/Core/ValueObjectDynamicValue.cpp
+++ b/lldb/source/Core/ValueObjectDynamicValue.cpp
@@ -81,7 +81,7 @@ TypeImpl
ValueObjectDynamicValue::GetTypeImpl ()
{
const bool success = UpdateValueIfNeeded(false);
- if (success)
+ if (success && m_type_impl.IsValid())
{
return m_type_impl;
}
@@ -225,12 +225,29 @@ ValueObjectDynamicValue::UpdateValue ()
m_update_point.SetUpdated();
- // if the runtime only vended a ClangASTType, then we have an hollow type that we don't want to use
- // but we save it for the TypeImpl, which can still use an hollow type for some questions
- if (found_dynamic_type && class_type_or_name.HasType() && !class_type_or_name.HasTypeSP())
+ if (found_dynamic_type)
+ {
+ if (class_type_or_name.HasType())
+ {
+ // TypeSP are always generated from debug info
+ if (!class_type_or_name.HasTypeSP() && class_type_or_name.GetClangASTType().IsRuntimeGeneratedType())
+ {
+ m_type_impl = TypeImpl(m_parent->GetClangType(),FixupTypeAndOrName(class_type_or_name, *m_parent).GetClangASTType());
+ class_type_or_name.SetClangASTType(ClangASTType());
+ }
+ else
+ {
+ m_type_impl = TypeImpl(FixupTypeAndOrName(class_type_or_name, *m_parent).GetClangASTType());
+ }
+ }
+ else
+ {
+ m_type_impl.Clear();
+ }
+ }
+ else
{
- m_type_impl = TypeImpl(m_parent->GetClangType(),FixupTypeAndOrName(class_type_or_name, *m_parent).GetClangASTType());
- class_type_or_name.SetClangASTType(ClangASTType());
+ m_type_impl.Clear();
}
// If we don't have a dynamic type, then make ourselves just a echo of our parent.
OpenPOWER on IntegriCloud