[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.

2018-06-13 Thread Phabricator via Phabricator via cfe-commits
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:

[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.

2018-06-13 Thread Ilya Biryukov via Phabricator via cfe-commits
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

[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.

2018-06-13 Thread Ilya Biryukov via Phabricator via cfe-commits
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,

[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.

2018-06-12 Thread Sam McCall via Phabricator via cfe-commits
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())

[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.

2018-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
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

[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.

2018-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
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

[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.

2018-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
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

[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.

2018-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
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