Fix a bug where language categories would hold on to their caches even after changes

llvm-svn: 255603
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 8edc8e5..35a0468 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -123,6 +123,19 @@
     return false;
 }
 
+void
+FormatManager::Changed ()
+{
+    ++m_last_revision;
+    m_format_cache.Clear ();
+    Mutex::Locker lang_locker(m_language_categories_mutex);
+    for (auto& iter : m_language_categories_map)
+    {
+        if (iter.second)
+            iter.second->GetFormatCache().Clear();
+    }
+}
+
 bool
 FormatManager::GetFormatFromCString (const char *format_cstr,
                                      bool partial_match_ok,
@@ -1043,12 +1056,12 @@
 }
 
 FormatManager::FormatManager() :
-    m_format_cache(),
-    m_named_summaries_map(this),
     m_last_revision(0),
-    m_categories_map(this),
-    m_language_categories_map(),
+    m_format_cache(),
     m_language_categories_mutex(Mutex::eMutexTypeRecursive),
+    m_language_categories_map(),
+    m_named_summaries_map(this),
+    m_categories_map(this),
     m_default_category_name(ConstString("default")),
     m_system_category_name(ConstString("system")), 
     m_vectortypes_category_name(ConstString("VectorTypes"))
@@ -1063,7 +1076,6 @@
 void
 FormatManager::LoadSystemFormatters()
 {
-    
     TypeSummaryImpl::Flags string_flags;
     string_flags.SetCascades(true)
     .SetSkipPointers(true)