This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE334585: [clangd] Move caching of compile args out of
ClangdServer. (authored by ibiryukov, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D48068?vs=151113=151114#toc
Repository:
ilya-biryukov updated this revision to Diff 151113.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
- Address review comments
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48068
Files:
clangd/CMakeLists.txt
clangd/ClangdLSPServer.cpp
ilya-biryukov added inline comments.
Comment at: clangd/GlobalCompilationDatabase.cpp:137
+ // 'It' may be invalid at this point, recompute it.
+ It = Cached.find(File);
+ if (It != Cached.end())
sammccall wrote:
> `return try_emplace(File,
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())
ilya-biryukov updated this revision to Diff 150920.
ilya-biryukov added a comment.
- Revert "Remove CachingCompilationDb". Turns out we do need it internally
(Thanks, Sam!) :-)
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48068
Files:
clangd/CMakeLists.txt
ilya-biryukov updated this revision to Diff 150917.
ilya-biryukov added a comment.
- Remove CachingCompilationDb
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48068
Files:
clangd/CMakeLists.txt
clangd/ClangdLSPServer.cpp
clangd/ClangdLSPServer.h
ilya-biryukov added a comment.
After looking at it more closely, it seems caching happens in the underlying
compilation databases anyway. So I guess we don't even need the
`CachingCompilationDatabase`.
I'll remove it.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48068
ilya-biryukov created this revision.
ilya-biryukov added a reviewer: sammccall.
Herald added subscribers: jkorous, MaskRay, ioeric, mgorny.
Caching is now handled by ClangdLSPServer and hidden behind the
GlobalCompilationDatabase interface. This simplifies ClangdServer.
No behavioral changes are