40 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FILEDISTANCE_H 41 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FILEDISTANCE_H 44 #include "llvm/ADT/DenseMap.h" 45 #include "llvm/ADT/DenseMapInfo.h" 46 #include "llvm/ADT/SmallString.h" 47 #include "llvm/ADT/StringRef.h" 48 #include "llvm/Support/Allocator.h" 49 #include "llvm/Support/Path.h" 50 #include "llvm/Support/StringSaver.h" 67 unsigned MaxUpTraversals = std::numeric_limits<unsigned>::max();
74 static constexpr
unsigned Unreachable = std::numeric_limits<unsigned>::max();
81 unsigned distance(llvm::StringRef
Path);
86 llvm::DenseMap<llvm::hash_code, unsigned> Cache;
98 : Sources(Sources), Opts(Opts) {}
102 unsigned distance(llvm::StringRef
URI);
109 llvm::DenseMap<llvm::hash_code, unsigned> Cache;
110 llvm::StringMap<SourceParams> Sources;
111 llvm::StringMap<std::unique_ptr<FileDistance>> ByScheme;
122 unsigned distance(llvm::StringRef SymbolScope);
131 #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