Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: tools/gn/command_refs.cc

Issue 561273003: Add public deps to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/gn/command_refs.cc
diff --git a/tools/gn/command_refs.cc b/tools/gn/command_refs.cc
index 88469ac7d27cc2d46793bbcf09fb8de5ec9f1058..2123eb57167bfb563d1f12943e437a0103792d8e 100644
--- a/tools/gn/command_refs.cc
+++ b/tools/gn/command_refs.cc
@@ -30,17 +30,8 @@ void FillDepMap(Setup* setup, DepMap* dep_map) {
setup->builder()->GetAllResolvedTargets();
for (size_t target_i = 0; target_i < targets.size(); target_i++) {
- const Target* target = targets[target_i];
-
- // Add all deps to the map.
- const LabelTargetVector& deps = target->deps();
- for (size_t dep_i = 0; dep_i < deps.size(); dep_i++)
- dep_map->insert(std::make_pair(deps[dep_i].ptr, target));
-
- // Include data deps as well.
- const LabelTargetVector& datadeps = target->datadeps();
- for (size_t dep_i = 0; dep_i < datadeps.size(); dep_i++)
- dep_map->insert(std::make_pair(datadeps[dep_i].ptr, target));
+ for (DepsIterator iter(targets[target_i]); !iter.done(); iter.Advance())
+ dep_map->insert(std::make_pair(iter.target(), targets[target_i]));
}
}

Powered by Google App Engine
This is Rietveld 408576698