1 //===-- FormatCache.h ---------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_FormatCache_h_
11 #define lldb_FormatCache_h_
17 // Other libraries and framework includes
19 #include "lldb/lldb-public.h"
20 #include "lldb/Core/ConstString.h"
21 #include "lldb/DataFormatters/FormatClasses.h"
23 namespace lldb_private {
30 bool m_summary_cached : 1;
31 bool m_synthetic_cached : 1;
33 lldb::TypeSummaryImplSP m_summary_sp;
34 lldb::SyntheticChildrenSP m_synthetic_sp;
37 Entry (lldb::TypeSummaryImplSP);
38 Entry (lldb::SyntheticChildrenSP);
39 Entry (lldb::TypeSummaryImplSP,lldb::SyntheticChildrenSP);
47 lldb::TypeSummaryImplSP
50 lldb::SyntheticChildrenSP
54 SetSummary (lldb::TypeSummaryImplSP);
57 SetSynthetic (lldb::SyntheticChildrenSP);
59 typedef std::map<ConstString,Entry> CacheMap;
63 uint64_t m_cache_hits;
64 uint64_t m_cache_misses;
67 GetEntry (const ConstString& type);
73 GetSummary (const ConstString& type,lldb::TypeSummaryImplSP& summary_sp);
76 GetSynthetic (const ConstString& type,lldb::SyntheticChildrenSP& synthetic_sp);
79 SetSummary (const ConstString& type,lldb::TypeSummaryImplSP& summary_sp);
82 SetSynthetic (const ConstString& type,lldb::SyntheticChildrenSP& synthetic_sp);
96 return m_cache_misses;
99 } // namespace lldb_private
101 #endif // lldb_FormatCache_h_