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

Unified Diff: tools/gn/substitution_pattern.h

Issue 440333002: Support more configurability in GN toolchains (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unsigned check Created 6 years, 4 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/substitution_list.cc ('k') | tools/gn/substitution_pattern.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/substitution_pattern.h
diff --git a/tools/gn/substitution_pattern.h b/tools/gn/substitution_pattern.h
index 70fc5eb375a00e4fcc909feaa0d648c9a62e7ea9..7e6c662519ad4518b25961480f1d298418e036ae 100644
--- a/tools/gn/substitution_pattern.h
+++ b/tools/gn/substitution_pattern.h
@@ -10,6 +10,7 @@
#include "tools/gn/substitution_type.h"
+class BuildSettings;
class Err;
class ParseNode;
class Value;
@@ -22,6 +23,10 @@ class SubstitutionPattern {
Subrange(SubstitutionType t, const std::string& l = std::string());
~Subrange();
+ inline bool operator==(const Subrange& other) const {
+ return type == other.type && literal == other.literal;
+ }
+
SubstitutionType type;
// When type_ == LITERAL, this specifies the literal.
@@ -41,7 +46,13 @@ class SubstitutionPattern {
// Sets the bits in the given vector corresponding to the substitutions used
// by this pattern. SUBSTITUTION_LITERAL is ignored.
- void FillRequiredTypes(bool required_types[SUBSTITUTION_NUM_TYPES]) const;
+ void FillRequiredTypes(SubstitutionBits* bits) const;
+
+ // Checks whether this pattern resolves to something in the output directory
+ // for the given build settings. If not, returns false and fills in the given
+ // error.
+ bool IsInOutputDir(const BuildSettings* build_settings,
+ Err* err) const;
// Returns a vector listing the substitutions used by this pattern, not
// counting SUBSTITUTION_LITERAL.
@@ -54,6 +65,7 @@ class SubstitutionPattern {
private:
std::vector<Subrange> ranges_;
+ const ParseNode* origin_;
std::vector<SubstitutionType> required_types_;
};
« no previous file with comments | « tools/gn/substitution_list.cc ('k') | tools/gn/substitution_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698