|
Ninja
|
Collects the transitive set of edges that lead into a given set of starting nodes. More...
#include <command_collector.h>
Public Member Functions | |
| void | CollectFrom (const Node *node) |
Public Attributes | |
| std::vector< Edge * > | in_edges |
| we use a vector to preserve order from requisites to their dependents. More... | |
Private Attributes | |
| std::unordered_set< Edge * > | visited_edges_ |
| std::unordered_set< const Node * > | visited_nodes_ |
Collects the transitive set of edges that lead into a given set of starting nodes.
Used to implement the compdb-targets tool.
When collecting inputs, the outputs of phony edges are always ignored from the result, but are followed by the dependency walk.
Usage is:
Definition at line 35 of file command_collector.h.
|
inline |
Definition at line 36 of file command_collector.h.
References Node::in_edge(), in_edges, Edge::inputs_, Edge::is_phony(), visited_edges_, and visited_nodes_.
Referenced by TEST_F().
| std::vector<Edge*> CommandCollector::in_edges |
we use a vector to preserve order from requisites to their dependents.
This may help LSP server performance in languages that support modules, but it also ensures that the output of -t compdb-targets foo is consistent, which is useful in regression tests.
Definition at line 62 of file command_collector.h.
Referenced by CollectFrom(), and TEST_F().
|
private |
Definition at line 55 of file command_collector.h.
Referenced by CollectFrom().
|
private |
Definition at line 54 of file command_collector.h.
Referenced by CollectFrom().