Home | History | Annotate | Download | only in Tooling

Lines Matching defs:Path

17 #include "llvm/Support/Path.h"
34 /// Each node has storage for up to one path and a map mapping a path segment to
42 /// An insert of a path
45 /// - If the node has a path 'p2' but no children, take the last path segment
51 /// An insert operation is linear in the number of a path's segments.
53 // We cannot put relative paths into the FileMatchTrie as then a path can be
54 // a postfix of another path, violating a core assumption of the trie.
55 if (llvm::sys::path::is_relative(NewPath))
57 if (Path.empty()) {
59 Path = NewPath;
63 // This is a leaf, ignore duplicate entry if 'Path' equals 'NewPath'.
64 if (NewPath == Path)
66 // Make this a node and create a child-leaf with 'Path'.
67 StringRef Element(llvm::sys::path::filename(
68 StringRef(Path).drop_back(ConsumedLength)));
69 Children[Element].Path = Path;
71 StringRef Element(llvm::sys::path::filename(
80 /// \c true and an empty string is returned. If no path fits 'FileName', an
84 /// To find the best matching node for a given path 'p', the
85 /// \c findEquivalent() function is called recursively for each path segment
88 /// whether the stored path is equivalent to 'p'. If yes, the best match is
91 /// - .. a child matching the next path segment. In this case, all children of
102 if (Comparator.equivalent(StringRef(Path), FileName))
103 return StringRef(Path);
106 StringRef Element(llvm::sys::path::filename(FileName.drop_back(
137 if (Path.empty())
140 Results.push_back(StringRef(Path));
152 // The stored absolute path in this node. Only valid for leaf nodes, i.e.
154 std::string Path;
156 // The children of this node stored in a map based on the next path segment.
176 if (llvm::sys::path::is_relative(FileName)) {
183 Error << "Path is ambiguous";