Lines Matching +full:root +full:- +full:relative

1 //===- FileMatchTrie.cpp --------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
42 /// child nodes. The trie starts with an empty root node.
50 /// 'p'starts at the root node and does the following:
51 /// - If the node is empty, insert 'p' into its storage and abort.
52 /// - If the node has a path 'p2' but no children, take the last path segment
55 /// - Insert a new child for the last segment of 'p' and insert the rest of
60 // We cannot put relative paths into the FileMatchTrie as then a path can be in insert()
73 // Make this a node and create a child-leaf with 'Path'. in insert()
94 /// - .. have children. In this case it is checked
98 /// - .. a child matching the next path segment. In this case, all children of
123 StringRef Result = MatchingChild->getValue().findEquivalent( in findEquivalent()
130 // If `ConsumedLength` is zero, this is the root and we have no filename in findEquivalent()
167 It->getValue().getAll(Results, Children.end()); in getAll()
183 : Root(new FileMatchTrieNode), Comparator(new DefaultPathComparator()) {} in FileMatchTrie()
186 : Root(new FileMatchTrieNode), Comparator(Comparator) {} in FileMatchTrie()
189 delete Root; in ~FileMatchTrie()
193 Root->insert(NewPath); in insert()
199 Error << "Cannot resolve relative paths"; in findEquivalent()
203 StringRef Result = Root->findEquivalent(*Comparator, FileName, IsAmbiguous); in findEquivalent()