OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_GN_BUILDER_H_ | 5 #ifndef TOOLS_GN_BUILDER_H_ |
6 #define TOOLS_GN_BUILDER_H_ | 6 #define TOOLS_GN_BUILDER_H_ |
7 | 7 |
| 8 #include <map> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/containers/hash_tables.h" | |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "tools/gn/builder_record.h" | 12 #include "tools/gn/builder_record.h" |
12 #include "tools/gn/label.h" | 13 #include "tools/gn/label.h" |
13 #include "tools/gn/label_ptr.h" | 14 #include "tools/gn/label_ptr.h" |
14 #include "tools/gn/unique_vector.h" | 15 #include "tools/gn/unique_vector.h" |
15 | 16 |
16 class Config; | 17 class Config; |
17 class Err; | 18 class Err; |
18 class Loader; | 19 class Loader; |
19 class ParseNode; | 20 class ParseNode; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Given a list of unresolved records, tries to find any circular | 124 // Given a list of unresolved records, tries to find any circular |
124 // dependencies and returns the string describing the problem. If no circular | 125 // dependencies and returns the string describing the problem. If no circular |
125 // deps were found, returns the empty string. | 126 // deps were found, returns the empty string. |
126 std::string CheckForCircularDependencies( | 127 std::string CheckForCircularDependencies( |
127 const std::vector<const BuilderRecord*>& bad_records) const; | 128 const std::vector<const BuilderRecord*>& bad_records) const; |
128 | 129 |
129 // Non owning pointer. | 130 // Non owning pointer. |
130 Loader* loader_; | 131 Loader* loader_; |
131 | 132 |
132 // Owning pointers. | 133 // Owning pointers. |
133 typedef base::hash_map<Label, BuilderRecord*> RecordMap; | 134 typedef std::map<Label, BuilderRecord*> RecordMap; |
134 RecordMap records_; | 135 RecordMap records_; |
135 | 136 |
136 ResolvedGeneratedCallback resolved_and_generated_callback_; | 137 ResolvedGeneratedCallback resolved_and_generated_callback_; |
137 | 138 |
138 DISALLOW_COPY_AND_ASSIGN(Builder); | 139 DISALLOW_COPY_AND_ASSIGN(Builder); |
139 }; | 140 }; |
140 | 141 |
141 #endif // TOOLS_GN_BUILDER_H_ | 142 #endif // TOOLS_GN_BUILDER_H_ |
OLD | NEW |