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

Unified Diff: tools/gn/scope.h

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)
Patch Set: 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 31bac6261464826a3bd069b3dd7d87ba5f5eaeba..377bb70b2ce066455247adea6a752ceae03114bd 100644
--- a/tools/gn/scope.h
+++ b/tools/gn/scope.h
@@ -99,7 +99,8 @@ class Scope {
};
// Creates an empty toplevel scope.
- explicit Scope(const Settings* settings);
+ Scope(const Settings* settings,
+ const std::set<uint32_t>& source_files_hashes);
brettw 2017/06/27 00:50:40 I believe a base::flat_set<uint32_t> will be more
alex-ac 2017/06/27 13:46:31 Done.
// Creates a dependent scope.
explicit Scope(Scope* parent);
@@ -283,6 +284,12 @@ 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 std::set<uint32_t>& source_files_hashes() const {
+ return source_files_hashes_;
+ }
+ void AddSourceFile(const SourceFile& source_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
@@ -378,6 +385,8 @@ class Scope {
SourceDir source_dir_;
+ std::set<uint32_t> source_files_hashes_;
+
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