summaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/DataFormatters/FormatCache.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-31 21:22:58 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-31 21:22:58 +0000
commit5ffd83dbcc34f10e07f6d3e968ae6365869615f4 (patch)
tree0e9f5cf729dde39f949698fddef45a34e2bc7f44 /contrib/llvm-project/lldb/source/DataFormatters/FormatCache.cpp
parent1799696096df87b52968b8996d00c91e0a5de8d9 (diff)
parentcfca06d7963fa0909f90483b42a6d7d194d01e08 (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/lldb/source/DataFormatters/FormatCache.cpp')
-rw-r--r--contrib/llvm-project/lldb/source/DataFormatters/FormatCache.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/contrib/llvm-project/lldb/source/DataFormatters/FormatCache.cpp b/contrib/llvm-project/lldb/source/DataFormatters/FormatCache.cpp
index 99f140705446..5e0965fcdae4 100644
--- a/contrib/llvm-project/lldb/source/DataFormatters/FormatCache.cpp
+++ b/contrib/llvm-project/lldb/source/DataFormatters/FormatCache.cpp
@@ -1,5 +1,4 @@
-//===-- FormatCache.cpp ------------------------------------------*- C++
-//-*-===//
+//===-- FormatCache.cpp ---------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -52,15 +51,6 @@ void FormatCache::Entry::Set(lldb::SyntheticChildrenSP synthetic_sp) {
m_synthetic_sp = synthetic_sp;
}
-FormatCache::FormatCache()
- : m_map(), m_mutex()
-#ifdef LLDB_CONFIGURATION_DEBUG
- ,
- m_cache_hits(0), m_cache_misses(0)
-#endif
-{
-}
-
FormatCache::Entry &FormatCache::GetEntry(ConstString type) {
auto i = m_map.find(type), e = m_map.end();
if (i != e)
@@ -88,15 +78,11 @@ bool FormatCache::Get(ConstString type, ImplSP &format_impl_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
auto entry = GetEntry(type);
if (entry.IsCached<ImplSP>()) {
-#ifdef LLDB_CONFIGURATION_DEBUG
m_cache_hits++;
-#endif
entry.Get(format_impl_sp);
return true;
}
-#ifdef LLDB_CONFIGURATION_DEBUG
m_cache_misses++;
-#endif
format_impl_sp.reset();
return false;
}