Shinichiro Hamaji | 776ca30 | 2015-06-06 03:52:48 +0900 | [diff] [blame] | 1 | #ifndef DEP_H_ |
| 2 | #define DEP_H_ |
| 3 | |
| 4 | #include <string> |
| 5 | #include <unordered_map> |
| 6 | #include <vector> |
| 7 | |
| 8 | #include "loc.h" |
| 9 | #include "string_piece.h" |
| 10 | |
| 11 | class Rule; |
| 12 | class Value; |
| 13 | class Vars; |
| 14 | |
| 15 | struct DepNode { |
| 16 | DepNode(StringPiece output, bool is_phony); |
| 17 | |
| 18 | StringPiece output; |
| 19 | vector<Value*> cmds; |
| 20 | vector<DepNode*> deps; |
| 21 | vector<DepNode*> parents; |
| 22 | bool has_rule; |
| 23 | bool is_order_only; |
| 24 | bool is_phony; |
| 25 | vector<StringPiece> actual_inputs; |
| 26 | Vars* target_specific_vars; |
| 27 | Loc loc; |
| 28 | }; |
| 29 | |
| 30 | void InitDepNodePool(); |
| 31 | void QuitDepNodePool(); |
| 32 | |
| 33 | void MakeDep(const vector<Rule*>& rules, |
| 34 | const Vars& vars, |
| 35 | const unordered_map<StringPiece, Vars*>& rule_vars, |
| 36 | const vector<StringPiece>& targets, |
| 37 | vector<DepNode*>* nodes); |
| 38 | |
| 39 | #endif // DEP_H_ |