<rdar://problem/12754509>
authorEnrico Granata <egranata@apple.com>
Tue, 27 Nov 2012 23:28:32 +0000 (23:28 +0000)
committerEnrico Granata <egranata@apple.com>
Tue, 27 Nov 2012 23:28:32 +0000 (23:28 +0000)
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

lldb/source/Core/ValueObjectDynamicValue.cpp

index 2b5c605..4e038c5 100644 (file)
@@ -176,8 +176,9 @@ ValueObjectDynamicValue::UpdateValue ()
     // 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();