mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
Introduce the notion of "type summary options" as flags that can be passed down to individual summary formatters to alter their behavior in a formatter-dependent way
Two flags are introduced: - preferred display language (as in, ObjC vs. C++) - summary capping (as in, should a limit be put to the amount of data retrieved) The meaning - if any - of these options is for individual formatters to establish The topic of a subsequent commit will be to actually wire these through to individual data formatters llvm-svn: 221482
This commit is contained in:
@@ -640,6 +640,29 @@ SBValue::GetSummary ()
|
||||
}
|
||||
return cstr;
|
||||
}
|
||||
|
||||
const char *
|
||||
SBValue::GetSummary (lldb::SBTypeSummaryOptions& options)
|
||||
{
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
const char *cstr = NULL;
|
||||
ValueLocker locker;
|
||||
lldb::ValueObjectSP value_sp(GetSP(locker));
|
||||
if (value_sp)
|
||||
{
|
||||
cstr = value_sp->GetSummaryAsCString(options.ref());
|
||||
}
|
||||
if (log)
|
||||
{
|
||||
if (cstr)
|
||||
log->Printf ("SBValue(%p)::GetSummary() => \"%s\"",
|
||||
static_cast<void*>(value_sp.get()), cstr);
|
||||
else
|
||||
log->Printf ("SBValue(%p)::GetSummary() => NULL",
|
||||
static_cast<void*>(value_sp.get()));
|
||||
}
|
||||
return cstr;
|
||||
}
|
||||
#endif // LLDB_DISABLE_PYTHON
|
||||
|
||||
const char *
|
||||
|
||||
Reference in New Issue
Block a user