<rdar://problem/12754509>
Make sure that ValueObjectDynamicValue clears itself when no dynamic type information can be found
This behavior was supposed to be already happening (as per the comment lines)
llvm-svn: 168743
diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp
index 2b5c605..4e038c5 100644
--- a/lldb/source/Core/ValueObjectDynamicValue.cpp
+++ b/lldb/source/Core/ValueObjectDynamicValue.cpp
@@ -176,8 +176,9 @@
// Or we could return false, and make ourselves an echo of our parent?
if (!found_dynamic_type)
{
- if (m_type_sp)
- SetValueDidChange(true);
+ ClearDynamicTypeInformation();
+ m_type_sp.reset();
+ SetValueDidChange(true);
m_value = m_parent->GetValue();
m_error = m_value.GetValueAsData (&exe_ctx, GetClangAST(), m_data, 0, GetModule().get());
return m_error.Success();