The existing logic to loop over formatters is very pre-C++11, using void* batons, and function pointers, and raw memory allocations instead of safer more modern constructs

This is a first pass at a cleanup of that code, modernizing the "type X clear" commands, and providing the basic infrastructure I plan to use all over
More cleanup will come over the next few days

llvm-svn: 253125
diff --git a/lldb/source/DataFormatters/DataVisualization.cpp b/lldb/source/DataFormatters/DataVisualization.cpp
index 440091d..581ef3f 100644
--- a/lldb/source/DataFormatters/DataVisualization.cpp
+++ b/lldb/source/DataFormatters/DataVisualization.cpp
@@ -231,6 +231,12 @@
     GetFormatManager().LoopThroughCategories(callback, callback_baton);
 }
 
+void
+DataVisualization::Categories::ForEach (TypeCategoryMap::ForEachCallback callback)
+{
+    GetFormatManager().ForEachCategory(callback);
+}
+
 uint32_t
 DataVisualization::Categories::GetCount ()
 {