summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/ClangdLSPServer.h
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-10-23 13:14:02 +0000
committerSam McCall <sam.mccall@gmail.com>2018-10-23 13:14:02 +0000
commit2172ee931c76eef70c0074bbaf328e831f566ab0 (patch)
tree4bd44c534430a5d2aefa42e8c6ca3c1e3bde5d5d /clang-tools-extra/clangd/ClangdLSPServer.h
parent051feee5c205330d0a245e3fe425f04b5ad593af (diff)
downloadbcm5719-llvm-2172ee931c76eef70c0074bbaf328e831f566ab0.tar.gz
bcm5719-llvm-2172ee931c76eef70c0074bbaf328e831f566ab0.zip
[clangd] Remove caching of compilation database commands.
Summary: The CDB implementations used in open-source code are fast, and our private slow CDB will soon do the relevant caching itself. Simplifying the GlobalCDB layer in clangd is important to get auto-index implemented at the right layer. Reviewers: ioeric, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53439 llvm-svn: 345024
Diffstat (limited to 'clang-tools-extra/clangd/ClangdLSPServer.h')
-rw-r--r--clang-tools-extra/clangd/ClangdLSPServer.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/clang-tools-extra/clangd/ClangdLSPServer.h b/clang-tools-extra/clangd/ClangdLSPServer.h
index c24c770ec8d..19bdcb611b2 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.h
+++ b/clang-tools-extra/clangd/ClangdLSPServer.h
@@ -135,21 +135,17 @@ private:
/// Returns a CDB that should be used to get compile commands for the
/// current instance of ClangdLSPServer.
- GlobalCompilationDatabase &getCDB();
+ GlobalCompilationDatabase &getCDB() { return *CDB; }
private:
CompilationDB(std::unique_ptr<GlobalCompilationDatabase> CDB,
- std::unique_ptr<CachingCompilationDb> CachingCDB,
bool IsDirectoryBased)
- : CDB(std::move(CDB)), CachingCDB(std::move(CachingCDB)),
- IsDirectoryBased(IsDirectoryBased) {}
+ : CDB(std::move(CDB)), IsDirectoryBased(IsDirectoryBased) {}
// if IsDirectoryBased is true, an instance of InMemoryCDB.
// If IsDirectoryBased is false, an instance of DirectoryBasedCDB.
// unique_ptr<GlobalCompilationDatabase> CDB;
std::unique_ptr<GlobalCompilationDatabase> CDB;
- // Non-null only for directory-based CDB
- std::unique_ptr<CachingCompilationDb> CachingCDB;
bool IsDirectoryBased;
};
OpenPOWER on IntegriCloud