[Lldb-commits] [lldb] 2fb07b9 - Remove unsound caching in LanguageCategory

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 10 16:11:19 PST 2019


Author: Adrian Prantl
Date: 2019-12-10T16:11:10-08:00
New Revision: 2fb07b90dc1c2c08fe6fc69c9d569a1fc2c8a8e1

URL: https://github.com/llvm/llvm-project/commit/2fb07b90dc1c2c08fe6fc69c9d569a1fc2c8a8e1
DIFF: https://github.com/llvm/llvm-project/commit/2fb07b90dc1c2c08fe6fc69c9d569a1fc2c8a8e1.diff

LOG: Remove unsound caching in LanguageCategory

Analogous to https://reviews.llvm.org/D71233 it is not safe to cache
something that depends on the actual ValueObject in a cache then keys
only off the type name.

Differential Revision: https://reviews.llvm.org/D71297

Added: 
    

Modified: 
    lldb/source/DataFormatters/LanguageCategory.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/DataFormatters/LanguageCategory.cpp b/lldb/source/DataFormatters/LanguageCategory.cpp
index 78237e18fb20..d4d8bb9cc8d6 100644
--- a/lldb/source/DataFormatters/LanguageCategory.cpp
+++ b/lldb/source/DataFormatters/LanguageCategory.cpp
@@ -110,10 +110,6 @@ bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
       break;
     }
   }
-  if (match_data.GetTypeForCache() &&
-      (!retval_sp || !retval_sp->NonCacheable())) {
-    m_format_cache.Set(match_data.GetTypeForCache(), retval_sp);
-  }
   return (bool)retval_sp;
 }
 


        


More information about the lldb-commits mailing list