| Index: tools/gn/command_desc.cc
|
| diff --git a/tools/gn/command_desc.cc b/tools/gn/command_desc.cc
|
| index 3f2bbaf51fb15b23ad9d3545eb46d1a4164de7ee..e78be769ce2f504223378a8809b2d60154822ee8 100644
|
| --- a/tools/gn/command_desc.cc
|
| +++ b/tools/gn/command_desc.cc
|
| @@ -14,6 +14,7 @@
|
| #include "tools/gn/filesystem_utils.h"
|
| #include "tools/gn/item.h"
|
| #include "tools/gn/label.h"
|
| +#include "tools/gn/pointer_set.h"
|
| #include "tools/gn/runtime_deps.h"
|
| #include "tools/gn/setup.h"
|
| #include "tools/gn/standard_out.h"
|
| @@ -46,10 +47,10 @@ std::string FormatSourceDir(const SourceDir& dir) {
|
| }
|
|
|
| void RecursiveCollectChildDeps(const Target* target,
|
| - std::set<const Target*>* result);
|
| + PointerSet<const Target>* result);
|
|
|
| void RecursiveCollectDeps(const Target* target,
|
| - std::set<const Target*>* result) {
|
| + PointerSet<const Target>* result) {
|
| if (result->find(target) != result->end())
|
| return; // Already did this target.
|
| result->insert(target);
|
| @@ -58,7 +59,7 @@ void RecursiveCollectDeps(const Target* target,
|
| }
|
|
|
| void RecursiveCollectChildDeps(const Target* target,
|
| - std::set<const Target*>* result) {
|
| + PointerSet<const Target>* result) {
|
| for (const auto& pair : target->GetDeps(Target::DEPS_ALL))
|
| RecursiveCollectDeps(pair.ptr, result);
|
| }
|
| @@ -69,7 +70,7 @@ void RecursiveCollectChildDeps(const Target* target,
|
| // set is null, all dependencies will be printed.
|
| void RecursivePrintDeps(const Target* target,
|
| const Label& default_toolchain,
|
| - std::set<const Target*>* seen_targets,
|
| + PointerSet<const Target>* seen_targets,
|
| int indent_level) {
|
| // Combine all deps into one sorted list.
|
| std::vector<LabelTargetPair> sorted_deps;
|
| @@ -123,7 +124,7 @@ void PrintDeps(const Target* target, bool display_header) {
|
| RecursivePrintDeps(target, toolchain_label, nullptr, 1);
|
| } else {
|
| // Don't recurse into duplicates.
|
| - std::set<const Target*> seen_targets;
|
| + PointerSet<const Target> seen_targets;
|
| RecursivePrintDeps(target, toolchain_label, &seen_targets, 1);
|
| }
|
| return;
|
| @@ -135,7 +136,7 @@ void PrintDeps(const Target* target, bool display_header) {
|
| if (display_header)
|
| OutputString("\nAll recursive dependencies:\n");
|
|
|
| - std::set<const Target*> all_deps;
|
| + PointerSet<const Target> all_deps;
|
| RecursiveCollectChildDeps(target, &all_deps);
|
| FilterAndPrintTargetSet(display_header, all_deps);
|
| } else {
|
|
|