If a ValueObjectDynamic has no formatter, try using its static type to figure one out
llvm-svn: 167803
return true;
}
}
+
+ // if all else fails, go to static type
+ if (valobj.IsDynamic())
+ {
+ if (log)
+ log->Printf("[Get] going to static value");
+ lldb::ValueObjectSP static_value_sp(valobj.GetStaticValue());
+ if (static_value_sp)
+ {
+ if (log)
+ log->Printf("[Get] has a static value - actually use it");
+ if (Get(*static_value_sp.get(), clang::QualType::getFromOpaquePtr(static_value_sp->GetClangType()) , entry, use_dynamic, reason))
+ {
+ reason |= lldb_private::eFormatterChoiceCriterionWentToStaticValue;
+ return true;
+ }
+ }
+ }
+
return false;
}
};
virtual bool
IsDynamic ()
{
- if (m_parent)
- return m_parent->IsDynamic();
- else
- return false;
+ return false;
}
-
+
virtual ValueObject *
GetParent()
{
eFormatterChoiceCriterionRegularExpressionSummary = 0x00000004,
eFormatterChoiceCriterionRegularExpressionFilter = 0x00000004,
eFormatterChoiceCriterionDynamicObjCDiscovery = 0x00000008,
- eFormatterChoiceCriterionStrippedBitField = 0x00000010
+ eFormatterChoiceCriterionStrippedBitField = 0x00000010,
+ eFormatterChoiceCriterionWentToStaticValue = 0x00000020
} FormatterChoiceCriterion;
//----------------------------------------------------------------------