39#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FILEDISTANCE_H
40#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FILEDISTANCE_H
42#include "llvm/ADT/ArrayRef.h"
43#include "llvm/ADT/DenseMap.h"
44#include "llvm/ADT/StringMap.h"
45#include "llvm/ADT/StringRef.h"
69 static constexpr unsigned Unreachable = std::numeric_limits<unsigned>::max();
81 llvm::DenseMap<llvm::hash_code, unsigned> Cache;
93 : Sources(Sources), Opts(Opts) {}
97 unsigned distance(llvm::StringRef URI);
101 FileDistance &forScheme(llvm::StringRef Scheme);
104 llvm::DenseMap<llvm::hash_code, unsigned> Cache;
105 llvm::StringMap<SourceParams> Sources;
106 llvm::StringMap<std::unique_ptr<FileDistance>> ByScheme;
107 FileDistanceOptions Opts;
117 unsigned distance(llvm::StringRef SymbolScope);
std::vector< std::string > QueryScopes
static constexpr unsigned Unreachable
unsigned distance(llvm::StringRef Path)
static const llvm::hash_code RootHash
Support lookups like FileDistance, but the lookup keys are symbol scopes.
unsigned distance(llvm::StringRef SymbolScope)
unsigned distance(llvm::StringRef URI)
URIDistance(llvm::StringMap< SourceParams > Sources, const FileDistanceOptions &Opts={})
std::string Path
A typedef to represent a file path.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
bool AllowDownTraversalFromRoot