diff options
Diffstat (limited to 'lldb/source/Core/FormatManager.cpp')
-rw-r--r-- | lldb/source/Core/FormatManager.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lldb/source/Core/FormatManager.cpp b/lldb/source/Core/FormatManager.cpp index e064534028f..47426fc49d5 100644 --- a/lldb/source/Core/FormatManager.cpp +++ b/lldb/source/Core/FormatManager.cpp @@ -192,6 +192,44 @@ FormatNavigator<lldb::RegularExpressionSP, SummaryFormat>::Delete(const char* ty return false; } +template<> +bool +FormatNavigator<lldb::RegularExpressionSP, SyntheticFilter>::Get(const char* key, SyntheticFilter::SharedPointer& value) +{ + Mutex::Locker(m_format_map.mutex()); + MapIterator pos, end = m_format_map.map().end(); + for (pos = m_format_map.map().begin(); pos != end; pos++) + { + lldb::RegularExpressionSP regex = pos->first; + if (regex->Execute(key)) + { + value = pos->second; + return true; + } + } + return false; +} + +template<> +bool +FormatNavigator<lldb::RegularExpressionSP, SyntheticFilter>::Delete(const char* type) +{ + Mutex::Locker(m_format_map.mutex()); + MapIterator pos, end = m_format_map.map().end(); + for (pos = m_format_map.map().begin(); pos != end; pos++) + { + lldb::RegularExpressionSP regex = pos->first; + if ( ::strcmp(type,regex->GetText()) == 0) + { + m_format_map.map().erase(pos); + if (m_format_map.listener) + m_format_map.listener->Changed(); + return true; + } + } + return false; +} + lldb::Format FormatManager::GetSingleItemFormat(lldb::Format vector_format) { |