llvm.org GIT mirror llvm / 6709c7b
Add df_iterator::getPathLength and getPath as a way of getting a path from the entry node to the current node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111392 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 9 years ago
1 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
182182 inline bool nodeVisited(NodeType *Node) const {
183183 return this->Visited.count(Node) != 0;
184184 }
185
186 /// getPathLength - Return the length of the path from the entry node to the
187 /// current node, counting both nodes.
188 unsigned getPathLength() const { return VisitStack.size(); }
189
190 /// getPath - Return the n'th node in the path from the the entry node to the
191 /// current node.
192 NodeType *getPath(unsigned n) const {
193 return VisitStack[n].first.getPointer();
194 }
185195 };
186196
187197