Make IsSyntheticChildrenGenerated() virtual so that dynamic and synthetic values can refer back to their parents

llvm-svn: 274901
This commit is contained in:
Enrico Granata 2016-07-08 18:39:36 +00:00
parent 0561bd5b47
commit 3b207c6655
5 changed files with 46 additions and 2 deletions

View File

@ -793,10 +793,10 @@ public:
return false;
}
bool
virtual bool
IsSyntheticChildrenGenerated ();
void
virtual void
SetSyntheticChildrenGenerated (bool b);
virtual SymbolContextScope *

View File

@ -117,6 +117,12 @@ public:
void
SetPreferredDisplayLanguage (lldb::LanguageType);
bool
IsSyntheticChildrenGenerated () override;
void
SetSyntheticChildrenGenerated (bool b) override;
bool
GetDeclaration(Declaration &decl) override;

View File

@ -147,6 +147,12 @@ public:
void
SetPreferredDisplayLanguage (lldb::LanguageType);
bool
IsSyntheticChildrenGenerated () override;
void
SetSyntheticChildrenGenerated (bool b) override;
bool
GetDeclaration(Declaration &decl) override;

View File

@ -418,6 +418,22 @@ ValueObjectDynamicValue::GetPreferredDisplayLanguage ()
return m_preferred_display_language;
}
bool
ValueObjectDynamicValue::IsSyntheticChildrenGenerated ()
{
if (m_parent)
return m_parent->IsSyntheticChildrenGenerated();
return false;
}
void
ValueObjectDynamicValue::SetSyntheticChildrenGenerated (bool b)
{
if (m_parent)
m_parent->SetSyntheticChildrenGenerated(b);
this->ValueObject::SetSyntheticChildrenGenerated(b);
}
bool
ValueObjectDynamicValue::GetDeclaration (Declaration &decl)
{

View File

@ -416,6 +416,22 @@ ValueObjectSynthetic::GetPreferredDisplayLanguage ()
return m_preferred_display_language;
}
bool
ValueObjectSynthetic::IsSyntheticChildrenGenerated ()
{
if (m_parent)
return m_parent->IsSyntheticChildrenGenerated();
return false;
}
void
ValueObjectSynthetic::SetSyntheticChildrenGenerated (bool b)
{
if (m_parent)
m_parent->SetSyntheticChildrenGenerated(b);
this->ValueObject::SetSyntheticChildrenGenerated(b);
}
bool
ValueObjectSynthetic::GetDeclaration (Declaration &decl)
{