summaryrefslogtreecommitdiffstats
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 2362ba52526..3237f73f64e 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -500,6 +500,21 @@ FormatManager::LoopThroughCategories (CategoryCallback callback, void* param)
}
}
+void
+FormatManager::ForEachCategory(TypeCategoryMap::ForEachCallback callback)
+{
+ m_categories_map.ForEach(callback);
+ Mutex::Locker locker(m_language_categories_mutex);
+ for (const auto& entry : m_language_categories_map)
+ {
+ if (auto category_sp = entry.second->GetCategory())
+ {
+ if (!callback(category_sp))
+ break;
+ }
+ }
+}
+
lldb::TypeCategoryImplSP
FormatManager::GetCategory (const ConstString& category_name,
bool can_create)
OpenPOWER on IntegriCloud