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

Unified Diff: tools/gn/target.cc

Issue 2880093002: gn desc: printing public_deps without --all and --tree
Patch Set: fixing documentation indentation Created 3 years, 6 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
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/variables.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target.cc
diff --git a/tools/gn/target.cc b/tools/gn/target.cc
index 759d7bff14493e59663830c67f2259562eb28f11..890db90383c36922f616e5dabffd7f3d34a01f43 100644
--- a/tools/gn/target.cc
+++ b/tools/gn/target.cc
@@ -418,13 +418,21 @@ bool Target::IsFinal() const {
}
DepsIteratorRange Target::GetDeps(DepsIterationType type) const {
- if (type == DEPS_LINKED) {
- return DepsIteratorRange(DepsIterator(
- &public_deps_, &private_deps_, nullptr));
+ switch (type) {
+ case DEPS_DATA:
+ return DepsIteratorRange(DepsIterator(&data_deps_, nullptr, nullptr));
+ case DEPS_LINKED:
+ return DepsIteratorRange(
+ DepsIterator(&public_deps_, &private_deps_, nullptr));
+ case DEPS_PRIVATE:
+ return DepsIteratorRange(DepsIterator(&private_deps_, nullptr, nullptr));
+ case DEPS_PUBLIC:
+ return DepsIteratorRange(DepsIterator(&public_deps_, nullptr, nullptr));
+ default:
+ // All deps.
+ return DepsIteratorRange(
+ DepsIterator(&public_deps_, &private_deps_, &data_deps_));
}
- // All deps.
- return DepsIteratorRange(DepsIterator(
- &public_deps_, &private_deps_, &data_deps_));
}
std::string Target::GetComputedOutputName() const {
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698