summaryrefslogtreecommitdiffstats
path: root/tools/gn/filesystem_utils.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-06 20:38:45 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-06 20:38:45 +0000
commit012db5948a0698795fe422babd122cf981295bf1 (patch)
treeee7b54ebcb5996017d9d2776115ff08726e09210 /tools/gn/filesystem_utils.h
parent98669472637dfe96e769d7bbb6fff94a435ac2c2 (diff)
downloadchromium_src-012db5948a0698795fe422babd122cf981295bf1.zip
chromium_src-012db5948a0698795fe422babd122cf981295bf1.tar.gz
chromium_src-012db5948a0698795fe422babd122cf981295bf1.tar.bz2
Refactor GN source expansions.
This is in preparation for using {{patterns}} in toolchain definitions. It makes them more generic and usable for this, without actually implementing any new features or changing behavior. The only external change should be that the $in variable is used for actions instead of making a redundant new variable (used to be called $source). It removes the FileTemplate class and explodes it into several files: the type list and helpers (substitution_type), a single pattern (substitution_pattern), a list of patterns (substitution_list), and a class of helper functions for processing templates in various ways (substitution_writer). Previously, the things needing substitutions (args, outputs, depfile) were stored as strings and parsed in to FileTemplates as needed. This new method stores the SubstitutionList/Pattern directly on the target. This allows it to issue parse errors (previously such errors were ignored since errors weren't reportable when writing Ninja files) and cleans up a lot of the code that uses it. R=scottmg@chromium.org Review URL: https://codereview.chromium.org/429423002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/filesystem_utils.h')
-rw-r--r--tools/gn/filesystem_utils.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/tools/gn/filesystem_utils.h b/tools/gn/filesystem_utils.h
index 3864ecc..71e7057 100644
--- a/tools/gn/filesystem_utils.h
+++ b/tools/gn/filesystem_utils.h
@@ -104,16 +104,11 @@ base::StringPiece FindLastDirComponent(const SourceDir& dir);
//
// The originating value will be blamed in the error.
//
-// Setting allow_templates indicates that the result will be put into a
-// FileTemplate and it will allow the strings to be prefixed with expansions
-// that would include the output path.
-//
// If the file isn't in the dir, returns false and sets the error. Otherwise
// returns true and leaves the error untouched.
bool EnsureStringIsInOutputDir(const SourceDir& dir,
const std::string& str,
const Value& originating,
- bool allow_templates,
Err* err);
// ----------------------------------------------------------------------------