#include "index/Background.h"
#include "Compiler.h"
#include "Config.h"
#include "Headers.h"
#include "SourceCode.h"
#include "URI.h"
#include "index/BackgroundIndexLoader.h"
#include "index/FileIndex.h"
#include "index/Index.h"
#include "index/IndexAction.h"
#include "index/MemIndex.h"
#include "index/Ref.h"
#include "index/Relation.h"
#include "index/Serialization.h"
#include "index/Symbol.h"
#include "index/SymbolCollector.h"
#include "support/Context.h"
#include "support/Logger.h"
#include "support/Path.h"
#include "support/Threading.h"
#include "support/ThreadsafeFS.h"
#include "support/Trace.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Stack.h"
#include "clang/Frontend/FrontendAction.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/xxhash.h"
#include <algorithm>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <cstddef>
#include <memory>
#include <mutex>
#include <numeric>
#include <optional>
#include <queue>
#include <random>
#include <string>
#include <thread>
#include <utility>
#include <vector>
namespace clang {
namespace clangd {
namespace {
llvm::SmallString<128> getAbsolutePath(const tooling::CompileCommand &Cmd) { … }
bool shardIsStale(const LoadedShard &LS, llvm::vfs::FileSystem *FS) { … }
}
BackgroundIndex::BackgroundIndex(
const ThreadsafeFS &TFS, const GlobalCompilationDatabase &CDB,
BackgroundIndexStorage::Factory IndexStorageFactory, Options Opts)
: … { … }
BackgroundIndex::~BackgroundIndex() { … }
BackgroundQueue::Task BackgroundIndex::changedFilesTask(
const std::vector<std::string> &ChangedFiles) { … }
static llvm::StringRef filenameWithoutExtension(llvm::StringRef Path) { … }
BackgroundQueue::Task BackgroundIndex::indexFileTask(std::string Path) { … }
void BackgroundIndex::boostRelated(llvm::StringRef Path) { … }
void BackgroundIndex::update(
llvm::StringRef MainFile, IndexFileIn Index,
const llvm::StringMap<ShardVersion> &ShardVersionsSnapshot,
bool HadErrors) { … }
llvm::Error BackgroundIndex::index(tooling::CompileCommand Cmd) { … }
std::vector<std::string>
BackgroundIndex::loadProject(std::vector<std::string> MainFiles) { … }
void BackgroundIndex::profile(MemoryTree &MT) const { … }
}
}