[PATCH] D92381: [clangd] Extract per-dir CDB cache to its own threadsafe class. NFC
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 9 01:37:18 PST 2020
kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.
thanks, lgtm!
================
Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:79
+ // Absolute canonical path that we're the cache for. (Not case-folded).
+ std::string Path;
+
----------------
nit: mark it const ?
================
Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:117
+ auto RequestBroadcast = llvm::make_scope_exit([&] {
+ if (ShouldBroadcast) {
+ ShouldBroadcast = NeedsBroadcast;
----------------
nit: early exit
================
Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:128
+
+ load();
+ CachePopulated = true;
----------------
nit: maybe stash modification of control signals to `load()` rather than having them split between `load()` and `get()` (or alternatively just change the `load` to return a `{shared,unique}_ptr` while making it a free function and then perform all the signal modifications inside `get`)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92381/new/
https://reviews.llvm.org/D92381
More information about the cfe-commits
mailing list