From bd83b87d72513d6911150a46c9a8c84fb0c155c3 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Tue, 27 Nov 2012 23:28:32 +0000 Subject: [PATCH] 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 @@ 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(); -- 2.7.4