JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lldb/source/Core/DataFileCache.cpp:23-46
+llvm::CachePruningPolicy DataFileCache::GetLLDBIndexCachePolicy() {
+ static llvm::CachePruningPolicy policy;
+ static llvm::once_flag once_flag;
+
+ llvm::call_once(once_flag, []() {
+ // Prune the cache based off of the LLDB settings each time we create a
+ // cache object.
----------------
I was worried that by caching the policy here, changing the `lldb-index-cache-`
settings after the first DataFileCache has been created won't have any effect.
But it looks like the DataFileCache is already a static/global used by the
Modules, so that's already the case in practice. Maybe a follow-up patch could
make that explicit in the help `enable-lldb-index-cache` help description.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131531/new/
https://reviews.llvm.org/D131531
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits