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 #include "tools/gn/builder.h" | 5 #include "tools/gn/builder.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "tools/gn/config.h" | 10 #include "tools/gn/config.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 } // namespace | 53 } // namespace |
54 | 54 |
55 Builder::Builder(Loader* loader) : loader_(loader) { | 55 Builder::Builder(Loader* loader) : loader_(loader) { |
56 } | 56 } |
57 | 57 |
58 Builder::~Builder() { | 58 Builder::~Builder() { |
59 } | 59 } |
60 | 60 |
61 void Builder::ItemDefined(scoped_ptr<Item> item) { | 61 void Builder::ItemDefined(std::unique_ptr<Item> item) { |
62 ScopedTrace trace(TraceItem::TRACE_DEFINE_TARGET, item->label()); | 62 ScopedTrace trace(TraceItem::TRACE_DEFINE_TARGET, item->label()); |
63 trace.SetToolchain(item->settings()->toolchain_label()); | 63 trace.SetToolchain(item->settings()->toolchain_label()); |
64 | 64 |
65 BuilderRecord::ItemType type = BuilderRecord::TypeOfItem(item.get()); | 65 BuilderRecord::ItemType type = BuilderRecord::TypeOfItem(item.get()); |
66 | 66 |
67 Err err; | 67 Err err; |
68 BuilderRecord* record = | 68 BuilderRecord* record = |
69 GetOrCreateRecordOfType(item->label(), item->defined_from(), type, &err); | 69 GetOrCreateRecordOfType(item->label(), item->defined_from(), type, &err); |
70 if (!record) { | 70 if (!record) { |
71 g_scheduler->FailWithError(err); | 71 g_scheduler->FailWithError(err); |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 std::string ret; | 506 std::string ret; |
507 for (size_t i = 0; i < cycle.size(); i++) { | 507 for (size_t i = 0; i < cycle.size(); i++) { |
508 ret += " " + cycle[i]->label().GetUserVisibleName(false); | 508 ret += " " + cycle[i]->label().GetUserVisibleName(false); |
509 if (i != cycle.size() - 1) | 509 if (i != cycle.size() - 1) |
510 ret += " ->"; | 510 ret += " ->"; |
511 ret += "\n"; | 511 ret += "\n"; |
512 } | 512 } |
513 | 513 |
514 return ret; | 514 return ret; |
515 } | 515 } |
OLD | NEW |