Shuffle APIs around a little bit, so that if you pass custom summary options, we don't end up caching the summary hence obtained. You may want to obtain an uncapped summary, but this should not be reflected in the summary we cache. The drawback is that we don't cache as aggressively as we could, but at least you get to have different summaries with different options without having to reset formatters or the SBValue at each step

llvm-svn: 222280
This commit is contained in:
Enrico Granata
2014-11-18 23:36:25 +00:00
parent aa5bb91f5a
commit 49bfafb510
6 changed files with 31 additions and 15 deletions

View File

@@ -933,24 +933,27 @@ ValueObject::GetSummaryAsCString (TypeSummaryImpl* summary_ptr,
const char *
ValueObject::GetSummaryAsCString ()
{
return GetSummaryAsCString(TypeSummaryOptions());
}
const char *
ValueObject::GetSummaryAsCString (const TypeSummaryOptions& options)
{
if (UpdateValueIfNeeded(true) && m_summary_str.empty())
{
GetSummaryAsCString(GetSummaryFormat().get(),
m_summary_str,
options);
TypeSummaryOptions());
}
if (m_summary_str.empty())
return NULL;
return m_summary_str.c_str();
}
bool
ValueObject::GetSummaryAsCString (std::string& destination,
const TypeSummaryOptions& options)
{
return GetSummaryAsCString(GetSummaryFormat().get(),
destination,
options);
}
bool
ValueObject::IsCStringContainer(bool check_pointer)
{