diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2018-01-25 14:19:21 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2018-01-25 14:19:21 +0000 |
commit | ea7b70344d9c64782eebd2fcdc64f72a27bf5605 (patch) | |
tree | 02684175e0d20ebc9fb4889e553e45613f447991 /clang-tools-extra/clangd/ClangdUnit.cpp | |
parent | bddd0bed54cd4ad642b69541179cda7b4ed20545 (diff) |
[clangd] Moved caching of compile commands to ClangdServer
Summary:
It allows to get rid of CppFile::getLastCommand and simplify the
code in the upcoming threading patch.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, jkorous-apple, ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D42429
Diffstat (limited to 'clang-tools-extra/clangd/ClangdUnit.cpp')
-rw-r--r-- | clang-tools-extra/clangd/ClangdUnit.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/clang-tools-extra/clangd/ClangdUnit.cpp b/clang-tools-extra/clangd/ClangdUnit.cpp index 6d65ef7273b..90dd221ec42 100644 --- a/clang-tools-extra/clangd/ClangdUnit.cpp +++ b/clang-tools-extra/clangd/ClangdUnit.cpp @@ -455,7 +455,6 @@ CppFile::deferRebuild(ParseInputs &&Inputs) { this->ASTPromise = std::promise<std::shared_ptr<ParsedASTWrapper>>(); this->ASTFuture = this->ASTPromise.get_future(); } - this->LastCommand = Inputs.CompileCommand; } // unlock Mutex. // Notify about changes to RebuildCounter. RebuildCond.notify_all(); @@ -636,11 +635,6 @@ std::shared_future<std::shared_ptr<ParsedASTWrapper>> CppFile::getAST() const { return ASTFuture; } -llvm::Optional<tooling::CompileCommand> CppFile::getLastCommand() const { - std::lock_guard<std::mutex> Lock(Mutex); - return LastCommand; -} - CppFile::RebuildGuard::RebuildGuard(CppFile &File, unsigned RequestRebuildCounter) : File(File), RequestRebuildCounter(RequestRebuildCounter) { |