aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/DataFormatters/FormatManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/DataFormatters/FormatManager.cpp')
-rw-r--r--lldb/source/DataFormatters/FormatManager.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 8edc8e5..3237f73 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -486,6 +486,21 @@ FormatManager::GetValidatorForType (lldb::TypeNameSpecifierImplSP type_sp)
}
void
+FormatManager::LoopThroughCategories (CategoryCallback callback, void* param)
+{
+ m_categories_map.LoopThrough(callback, param);
+ Mutex::Locker locker(m_language_categories_mutex);
+ for (const auto& entry : m_language_categories_map)
+ {
+ if (auto category_sp = entry.second->GetCategory())
+ {
+ if (!callback(param, category_sp))
+ break;
+ }
+ }
+}
+
+void
FormatManager::ForEachCategory(TypeCategoryMap::ForEachCallback callback)
{
m_categories_map.ForEach(callback);