mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
<rdar://problem/12493007>
Added a new API call to help efficiently determine if a SBValue could have children:
bool
SBValue::MightHaveChildren ();
This is inteneded to be used bui GUI programs that need to show if a SBValue needs a disclosure triangle when displaying a hierarchical type in a tree view without having to complete the type (by calling SBValue::GetNumChildren()) as completing the type is expensive.
llvm-svn: 166460
This commit is contained in:
@@ -1354,6 +1354,20 @@ SBValue::GetValueAsUnsigned(uint64_t fail_value)
|
||||
return fail_value;
|
||||
}
|
||||
|
||||
bool
|
||||
SBValue::MightHaveChildren ()
|
||||
{
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
bool has_children = false;
|
||||
lldb::ValueObjectSP value_sp(GetSP());
|
||||
if (value_sp)
|
||||
has_children = value_sp->MightHaveChildren();
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBValue(%p)::HasChildren() => %i", value_sp.get(), has_children);
|
||||
return has_children;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBValue::GetNumChildren ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user