forked from OSchip/llvm-project
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
This commit is contained in:
parent
eccdbde667
commit
2aa09d4319
|
@ -968,7 +968,7 @@ protected:
|
||||||
void
|
void
|
||||||
SetChildrenCount (size_t count)
|
SetChildrenCount (size_t count)
|
||||||
{
|
{
|
||||||
m_children_count = count;
|
Clear(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
|
@ -978,10 +978,10 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Clear()
|
Clear(size_t new_count = 0)
|
||||||
{
|
{
|
||||||
m_children_count = 0;
|
|
||||||
Mutex::Locker locker(m_mutex);
|
Mutex::Locker locker(m_mutex);
|
||||||
|
m_children_count = new_count;
|
||||||
m_children.clear();
|
m_children.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue