[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 12 10:35:20 PDT 2018
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clangd/GlobalCompilationDatabase.cpp:137
+ // 'It' may be invalid at this point, recompute it.
+ It = Cached.find(File);
+ if (It != Cached.end())
----------------
`return try_emplace(File, std::move(Command)).second`?
(This has different behavior if the cache was filled while you unlocked, but it's arguably the right behavior and doesn't really matter).
================
Comment at: clangd/GlobalCompilationDatabase.h:93
+public:
+ explicit CachingCompilationDb(GlobalCompilationDatabase &InnerCDB);
+
----------------
const ref
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48068
More information about the cfe-commits
mailing list