If a ValueObject has a child that vends synthetic children, but only does so to generate a value for itself, that's not a disqualifier from one-line printing. Also, fetch synthetic values if available and requested for children as well while printing them

llvm-svn: 219427
This commit is contained in:
Enrico Granata
2014-10-09 18:47:36 +00:00
parent 55f66f77fe
commit ddac7611ee
4 changed files with 19 additions and 6 deletions

View File

@@ -591,9 +591,8 @@ ValueObjectPrinter::PrintChildrenOneLiner (bool hide_names)
for (uint32_t idx=0; idx<num_children; ++idx)
{
lldb::ValueObjectSP child_sp(synth_m_valobj->GetChildAtIndex(idx, true));
lldb::ValueObjectSP child_dyn_sp = child_sp.get() ? child_sp->GetDynamicValue(options.m_use_dynamic) : child_sp;
if (child_dyn_sp)
child_sp = child_dyn_sp;
if (child_sp)
child_sp = child_sp->GetQualifiedRepresentationIfAvailable(options.m_use_dynamic, options.m_use_synthetic);
if (child_sp)
{
if (idx)