39 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FILEDISTANCE_H 40 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FILEDISTANCE_H 43 #include "llvm/ADT/DenseMap.h" 44 #include "llvm/ADT/DenseMapInfo.h" 45 #include "llvm/ADT/SmallString.h" 46 #include "llvm/ADT/StringRef.h" 47 #include "llvm/Support/Allocator.h" 48 #include "llvm/Support/Path.h" 49 #include "llvm/Support/StringSaver.h" 66 unsigned MaxUpTraversals = std::numeric_limits<unsigned>::max();
73 static constexpr
unsigned Unreachable = std::numeric_limits<unsigned>::max();
80 unsigned distance(llvm::StringRef
Path);
85 llvm::DenseMap<llvm::hash_code, unsigned> Cache;
97 : Sources(Sources), Opts(Opts) {}
101 unsigned distance(llvm::StringRef
URI);
108 llvm::DenseMap<llvm::hash_code, unsigned> Cache;
109 llvm::StringMap<SourceParams> Sources;
110 llvm::StringMap<std::unique_ptr<FileDistance>> ByScheme;
121 unsigned distance(llvm::StringRef SymbolScope);
130 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_FILEDISTANCE_H
URIDistance(llvm::StringMap< SourceParams > Sources, const FileDistanceOptions &Opts={})
std::string Path
A typedef to represent a file path.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Support lookups like FileDistance, but the lookup keys are symbol scopes.
A URI describes the location of a source file.
bool AllowDownTraversalFromRoot
static const llvm::hash_code RootHash