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

Side by Side Diff: tools/gn/file_template.h

Issue 386943006: Pull buildtools to get GN r282653 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/protobuf/proto_library.gni ('k') | tools/gn/filesystem_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TOOLS_GN_FILE_TEMPLATE_H_ 5 #ifndef TOOLS_GN_FILE_TEMPLATE_H_
6 #define TOOLS_GN_FILE_TEMPLATE_H_ 6 #define TOOLS_GN_FILE_TEMPLATE_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void WriteNinjaVariablesForSubstitution( 122 void WriteNinjaVariablesForSubstitution(
123 std::ostream& out, 123 std::ostream& out,
124 const SourceFile& source, 124 const SourceFile& source,
125 const EscapeOptions& escape_options) const; 125 const EscapeOptions& escape_options) const;
126 126
127 // Returns the Ninja variable name used by the above Ninja functions to 127 // Returns the Ninja variable name used by the above Ninja functions to
128 // substitute for the given type. 128 // substitute for the given type.
129 static const char* GetNinjaVariableNameForType(Subrange::Type type); 129 static const char* GetNinjaVariableNameForType(Subrange::Type type);
130 130
131 // Extracts the given type of substitution from the given source file. 131 // Extracts the given type of substitution from the given source file.
132 // If output_style is RELATIVE, relative_to indicates the directory that the 132 // If output_style is OUTPUT_RELATIVE, relative_to indicates the directory
133 // relative directories should be relative to, otherwise it is ignored. 133 // that the relative directories should be relative to, otherwise it is
134 // ignored.
134 static std::string GetSubstitution(const Settings* settings, 135 static std::string GetSubstitution(const Settings* settings,
135 const SourceFile& source, 136 const SourceFile& source,
136 Subrange::Type type, 137 Subrange::Type type,
137 OutputStyle output_style, 138 OutputStyle output_style,
138 const SourceDir& relative_to); 139 const SourceDir& relative_to);
139 140
140 // Known template types, these include the "{{ }}". 141 // Known template types, these include the "{{ }}".
141 // IF YOU ADD NEW ONES: If the expansion expands to something inside the 142 // IF YOU ADD NEW ONES: If the expansion expands to something inside the
142 // output directory, also update EnsureStringIsInOutputDir. 143 // output directory, also update EnsureStringIsInOutputDir.
143 static const char kSource[]; 144 static const char kSource[];
(...skipping 23 matching lines...) Expand all
167 // required. This allows us to precompute these types whem applying them 168 // required. This allows us to precompute these types whem applying them
168 // to a given source file. 169 // to a given source file.
169 bool types_required_[Subrange::NUM_TYPES]; 170 bool types_required_[Subrange::NUM_TYPES];
170 171
171 // Set when any of the types_required_ is true. Otherwise, everythins is a 172 // Set when any of the types_required_ is true. Otherwise, everythins is a
172 // literal (a common case so we can optimize some code paths). 173 // literal (a common case so we can optimize some code paths).
173 bool has_substitutions_; 174 bool has_substitutions_;
174 }; 175 };
175 176
176 #endif // TOOLS_GN_FILE_TEMPLATE_H_ 177 #endif // TOOLS_GN_FILE_TEMPLATE_H_
OLDNEW
« no previous file with comments | « third_party/protobuf/proto_library.gni ('k') | tools/gn/filesystem_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698