18 : m_format_cached(false), m_summary_cached(false),
19 m_synthetic_cached(false) {}
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;
64 template<>
bool FormatCache::Entry::IsCached<lldb::TypeFormatImplSP>() {
65 return IsFormatCached();
67 template<>
bool FormatCache::Entry::IsCached<lldb::TypeSummaryImplSP> () {
68 return IsSummaryCached();
70 template<>
bool FormatCache::Entry::IsCached<lldb::SyntheticChildrenSP>() {
71 return IsSyntheticCached();
76 template <
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();
93 FormatCache::Get<lldb::TypeFormatImplSP>(
ConstString, lldb::TypeFormatImplSP &);
95 FormatCache::Get<lldb::TypeSummaryImplSP>(
ConstString,
96 lldb::TypeSummaryImplSP &);
98 FormatCache::Get<lldb::SyntheticChildrenSP>(
ConstString,
99 lldb::SyntheticChildrenSP &);
103 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
108 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
113 lldb::SyntheticChildrenSP &synthetic_sp) {
114 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
119 std::lock_guard<std::recursive_mutex> guard(
m_mutex);