diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-12-10 15:32:57 -0800 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-12-11 09:27:12 -0800 |
commit | ee64dfd953f89a9d3df3c13a28b1bce33f33f4cb (patch) | |
tree | c64f7ba393b6d09c86dcf5c5467f0e295dbe1841 /lldb/source/DataFormatters/FormatCache.cpp | |
parent | 5a3a9e9927b714e94e1c1b839e17429806272052 (diff) | |
download | bcm5719-llvm-ee64dfd953f89a9d3df3c13a28b1bce33f33f4cb.tar.gz bcm5719-llvm-ee64dfd953f89a9d3df3c13a28b1bce33f33f4cb.zip |
Remove TypeValidators (NFC in terms of the testsuite)
This is a half-implemented feature that as far as we can tell was
never used by anything since its original inclusion in 2014. This
patch removes it to make remaining the code easier to understand.
Differential Revision: https://reviews.llvm.org/D71310
Diffstat (limited to 'lldb/source/DataFormatters/FormatCache.cpp')
-rw-r--r-- | lldb/source/DataFormatters/FormatCache.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/lldb/source/DataFormatters/FormatCache.cpp b/lldb/source/DataFormatters/FormatCache.cpp index 0876673cfa8..231e7ed0c0a 100644 --- a/lldb/source/DataFormatters/FormatCache.cpp +++ b/lldb/source/DataFormatters/FormatCache.cpp @@ -17,7 +17,7 @@ using namespace lldb_private; FormatCache::Entry::Entry() : m_format_cached(false), m_summary_cached(false), - m_synthetic_cached(false), m_validator_cached(false) {} + m_synthetic_cached(false) {} bool FormatCache::Entry::IsFormatCached() { return m_format_cached; } @@ -25,8 +25,6 @@ bool FormatCache::Entry::IsSummaryCached() { return m_summary_cached; } bool FormatCache::Entry::IsSyntheticCached() { return m_synthetic_cached; } -bool FormatCache::Entry::IsValidatorCached() { return m_validator_cached; } - void FormatCache::Entry::Get(lldb::TypeFormatImplSP &retval) { retval = m_format_sp; } @@ -39,10 +37,6 @@ void FormatCache::Entry::Get(lldb::SyntheticChildrenSP &retval) { retval = m_synthetic_sp; } -void FormatCache::Entry::Get(lldb::TypeValidatorImplSP &retval) { - retval = m_validator_sp; -} - void FormatCache::Entry::Set(lldb::TypeFormatImplSP format_sp) { m_format_cached = true; m_format_sp = format_sp; @@ -58,11 +52,6 @@ void FormatCache::Entry::Set(lldb::SyntheticChildrenSP synthetic_sp) { m_synthetic_sp = synthetic_sp; } -void FormatCache::Entry::Set(lldb::TypeValidatorImplSP validator_sp) { - m_validator_cached = true; - m_validator_sp = validator_sp; -} - FormatCache::FormatCache() : m_map(), m_mutex() #ifdef LLDB_CONFIGURATION_DEBUG @@ -89,9 +78,6 @@ template<> bool FormatCache::Entry::IsCached<lldb::TypeSummaryImplSP> () { template<> bool FormatCache::Entry::IsCached<lldb::SyntheticChildrenSP>() { return IsSyntheticCached(); } -template<> bool FormatCache::Entry::IsCached<lldb::TypeValidatorImplSP>() { - return IsValidatorCached(); -} template <typename ImplSP> bool FormatCache::Get(ConstString type, ImplSP &format_impl_sp) { @@ -111,12 +97,9 @@ bool FormatCache::Get(ConstString type, ImplSP &format_impl_sp) { return false; } -/// Explicit instantiations for the four types. +/// Explicit instantiations for the three types. /// \{ template bool -FormatCache::Get<lldb::TypeValidatorImplSP>(ConstString, - lldb::TypeValidatorImplSP &); -template bool FormatCache::Get<lldb::TypeFormatImplSP>(ConstString, lldb::TypeFormatImplSP &); template bool FormatCache::Get<lldb::TypeSummaryImplSP>(ConstString, @@ -142,12 +125,6 @@ void FormatCache::Set(ConstString type, GetEntry(type).Set(synthetic_sp); } -void FormatCache::Set(ConstString type, - lldb::TypeValidatorImplSP &validator_sp) { - std::lock_guard<std::recursive_mutex> guard(m_mutex); - GetEntry(type).Set(validator_sp); -} - void FormatCache::Clear() { std::lock_guard<std::recursive_mutex> guard(m_mutex); m_map.clear(); |