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

Unified Diff: tools/gn/scope.cc

Issue 269723006: Add get_target_outputs function to GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 7 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/scope.h ('k') | tools/gn/target_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/scope.cc
diff --git a/tools/gn/scope.cc b/tools/gn/scope.cc
index 931574935e22d36001aebc68931c64b08bc41947..437b31fafde23b0e6aeb07fb9b64a7657e4c7198 100644
--- a/tools/gn/scope.cc
+++ b/tools/gn/scope.cc
@@ -22,21 +22,24 @@ Scope::Scope(const Settings* settings)
: const_containing_(NULL),
mutable_containing_(NULL),
settings_(settings),
- mode_flags_(0) {
+ mode_flags_(0),
+ item_collector_(NULL) {
}
Scope::Scope(Scope* parent)
: const_containing_(NULL),
mutable_containing_(parent),
settings_(parent->settings()),
- mode_flags_(0) {
+ mode_flags_(0),
+ item_collector_(NULL) {
}
Scope::Scope(const Scope* parent)
: const_containing_(parent),
mutable_containing_(NULL),
settings_(parent->settings()),
- mode_flags_(0) {
+ mode_flags_(0),
+ item_collector_(NULL) {
}
Scope::~Scope() {
@@ -390,6 +393,14 @@ const SourceDir& Scope::GetSourceDir() const {
return source_dir_;
}
+Scope::ItemVector* Scope::GetItemCollector() {
+ if (item_collector_)
+ return item_collector_;
+ if (mutable_containing())
+ return mutable_containing()->GetItemCollector();
+ return NULL;
+}
+
void Scope::SetProperty(const void* key, void* value) {
if (!value) {
DCHECK(properties_.find(key) != properties_.end());
« no previous file with comments | « tools/gn/scope.h ('k') | tools/gn/target_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698