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;
64template<>
bool FormatCache::Entry::IsCached<lldb::TypeFormatImplSP>() {
65 return IsFormatCached();
67template<>
bool FormatCache::Entry::IsCached<lldb::TypeSummaryImplSP> () {
68 return IsSummaryCached();
70template<>
bool FormatCache::Entry::IsCached<lldb::SyntheticChildrenSP>() {
71 return IsSyntheticCached();
76template <
typename ImplSP>
78 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
80 if (entry.IsCached<ImplSP>()) {
82 entry.Get(format_impl_sp);
86 format_impl_sp.reset();
95FormatCache::Get<lldb::TypeSummaryImplSP>(
ConstString,
98FormatCache::Get<lldb::SyntheticChildrenSP>(
ConstString,
103 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
108 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
114 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
119 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
void Set(lldb::TypeFormatImplSP)
Entry(Type t=Type::Invalid, const char *s=nullptr, const char *f=nullptr)