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

Unified Diff: tools/gn/scope.h

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)
Patch Set: Fix compilation after rebase. 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/runtime_deps_unittest.cc ('k') | tools/gn/scope.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/scope.h
diff --git a/tools/gn/scope.h b/tools/gn/scope.h
index eeabbebed3c946761c6db0e2ece7f1f75c20ad54..2adcabd20c3d8995a3ce08e330b80c6d69205c55 100644
--- a/tools/gn/scope.h
+++ b/tools/gn/scope.h
@@ -15,6 +15,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "tools/gn/err.h"
+#include "tools/gn/input_file.h"
#include "tools/gn/pattern.h"
#include "tools/gn/source_dir.h"
#include "tools/gn/value.h"
@@ -99,7 +100,7 @@ class Scope {
};
// Creates an empty toplevel scope.
- explicit Scope(const Settings* settings);
+ Scope(const Settings* settings, const InputFileSet& input_files);
// Creates a dependent scope.
explicit Scope(Scope* parent);
@@ -284,6 +285,10 @@ class Scope {
const SourceDir& GetSourceDir() const;
void set_source_dir(const SourceDir& d) { source_dir_ = d; }
+ // The set of source files which affected this scope.
+ const InputFileSet& input_files() const { return input_files_; }
+ void AddInputFile(const InputFile* input_file);
+
// The item collector is where Items (Targets, Configs, etc.) go that have
// been defined. If a scope can generate items, this non-owning pointer will
// point to the storage for such items. The creator of this scope will be
@@ -379,6 +384,8 @@ class Scope {
SourceDir source_dir_;
+ InputFileSet input_files_;
+
DISALLOW_COPY_AND_ASSIGN(Scope);
};
« no previous file with comments | « tools/gn/runtime_deps_unittest.cc ('k') | tools/gn/scope.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698