18 : m_format_cached(false), m_summary_cached(false),
19 m_synthetic_cached(false) {}
21bool FormatCache::Entry::IsFormatCached() {
return m_format_cached; }
23bool FormatCache::Entry::IsSummaryCached() {
return m_summary_cached; }
25bool FormatCache::Entry::IsSyntheticCached() {
return m_synthetic_cached; }
32 retval = m_summary_sp;
36 retval = m_synthetic_sp;
40 m_format_cached =
true;
41 m_format_sp = format_sp;
45 m_summary_cached =
true;
46 m_summary_sp = summary_sp;
50 m_synthetic_cached =
true;
51 m_synthetic_sp = synthetic_sp;
56template<>
bool FormatCache::Entry::IsCached<lldb::TypeFormatImplSP>() {
57 return IsFormatCached();
59template<>
bool FormatCache::Entry::IsCached<lldb::TypeSummaryImplSP> () {
60 return IsSummaryCached();
62template<>
bool FormatCache::Entry::IsCached<lldb::SyntheticChildrenSP>() {
63 return IsSyntheticCached();
68template <
typename ImplSP>
70 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
72 if (entry.IsCached<ImplSP>()) {
74 entry.Get(format_impl_sp);
78 format_impl_sp.reset();
87FormatCache::Get<lldb::TypeSummaryImplSP>(
ConstString,
90FormatCache::Get<lldb::SyntheticChildrenSP>(
ConstString,
95 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
100 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
106 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
111 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
A uniqued constant string class.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::TypeSummaryImpl > TypeSummaryImplSP
std::shared_ptr< lldb_private::TypeFormatImpl > TypeFormatImplSP
std::shared_ptr< lldb_private::SyntheticChildren > SyntheticChildrenSP
Entry(Type t=Type::Invalid, const char *s=nullptr, const char *f=nullptr)