From 2aa09d4319ff20528806bbb85844559b22347294 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 30 Jul 2014 21:23:55 +0000 Subject: [PATCH] When resetting the number of children on a ValueObject, also clear the existing children. This avoids issues where dynamic types change, but children stay the same llvm-svn: 214341 --- lldb/include/lldb/Core/ValueObject.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index 3d133efab3bf..2308f9ba95e8 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -968,7 +968,7 @@ protected: void SetChildrenCount (size_t count) { - m_children_count = count; + Clear(count); } size_t @@ -978,10 +978,10 @@ protected: } void - Clear() + Clear(size_t new_count = 0) { - m_children_count = 0; Mutex::Locker locker(m_mutex); + m_children_count = new_count; m_children.clear(); }