summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/ClangdUnitStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/ClangdUnitStore.cpp')
-rw-r--r--clang-tools-extra/clangd/ClangdUnitStore.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/clang-tools-extra/clangd/ClangdUnitStore.cpp b/clang-tools-extra/clangd/ClangdUnitStore.cpp
deleted file mode 100644
index bc2479d669e..00000000000
--- a/clang-tools-extra/clangd/ClangdUnitStore.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-//===--- ClangdUnitStore.cpp - A ClangdUnits container -----------*-C++-*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "ClangdUnitStore.h"
-#include "llvm/Support/Path.h"
-#include <algorithm>
-
-using namespace clang::clangd;
-using namespace clang;
-
-std::shared_ptr<CppFile> CppFileCollection::removeIfPresent(PathRef File) {
- std::lock_guard<std::mutex> Lock(Mutex);
-
- auto It = OpenedFiles.find(File);
- if (It == OpenedFiles.end())
- return nullptr;
-
- std::shared_ptr<CppFile> Result = It->second;
- OpenedFiles.erase(It);
- return Result;
-}
-std::vector<std::pair<Path, std::size_t>>
-CppFileCollection::getUsedBytesPerFile() const {
- std::lock_guard<std::mutex> Lock(Mutex);
- std::vector<std::pair<Path, std::size_t>> Result;
- Result.reserve(OpenedFiles.size());
- for (auto &&PathAndFile : OpenedFiles)
- Result.push_back(
- {PathAndFile.first().str(), PathAndFile.second->getUsedBytes()});
- return Result;
-}
OpenPOWER on IntegriCloud