Index: tools/gn/command_desc.cc |
diff --git a/tools/gn/command_desc.cc b/tools/gn/command_desc.cc |
index 3f2bbaf51fb15b23ad9d3545eb46d1a4164de7ee..b9e2257e03bdd9acba3ff9c588a27ded5742c32e 100644 |
--- a/tools/gn/command_desc.cc |
+++ b/tools/gn/command_desc.cc |
@@ -11,6 +11,7 @@ |
#include "tools/gn/config.h" |
#include "tools/gn/config_values_extractors.h" |
#include "tools/gn/deps_iterator.h" |
+#include "tools/gn/dereference_comparator.h" |
#include "tools/gn/filesystem_utils.h" |
#include "tools/gn/item.h" |
#include "tools/gn/label.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 { |