Home | History | Annotate | Download | only in Tooling

Lines Matching defs:Path

17 #include "llvm/Support/Path.h"
36 /// Each node has storage for up to one path and a map mapping a path segment to
44 /// An insert of a path
47 /// - If the node has a path 'p2' but no children, take the last path segment
53 /// An insert operation is linear in the number of a path's segments.
55 // We cannot put relative paths into the FileMatchTrie as then a path can be
56 // a postfix of another path, violating a core assumption of the trie.
57 if (llvm::sys::path::is_relative(NewPath))
59 if (Path.empty()) {
61 Path = NewPath;
65 // This is a leaf, ignore duplicate entry if 'Path' equals 'NewPath'.
66 if (NewPath == Path)
68 // Make this a node and create a child-leaf with 'Path'.
69 StringRef Element(llvm::sys::path::filename(
70 StringRef(Path).drop_back(ConsumedLength)));
71 Children[Element].Path = Path;
73 StringRef Element(llvm::sys::path::filename(
82 /// \c true and an empty string is returned. If no path fits 'FileName', an
86 /// To find the best matching node for a given path 'p', the
87 /// \c findEquivalent() function is called recursively for each path segment
90 /// whether the stored path is equivalent to 'p'. If yes, the best match is
93 /// - .. a child matching the next path segment. In this case, all children of
104 if (Comparator.equivalent(StringRef(Path), FileName))
105 return StringRef(Path);
108 StringRef Element(llvm::sys::path::filename(FileName.drop_back(
139 if (Path.empty())
142 Results.push_back(StringRef(Path));
154 // The stored absolute path in this node. Only valid for leaf nodes, i.e.
156 std::string Path;
158 // The children of this node stored in a map based on the next path segment.
180 if (llvm::sys::path::is_relative(FileName)) {
187 Error << "Path is ambiguous";