| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SUBSTITUTION_TYPE_H_ | 5 #ifndef TOOLS_GN_SUBSTITUTION_TYPE_H_ |
| 6 #define TOOLS_GN_SUBSTITUTION_TYPE_H_ | 6 #define TOOLS_GN_SUBSTITUTION_TYPE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 class Err; | 10 class Err; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Valid for all compiler tools. | 26 // Valid for all compiler tools. |
| 27 SUBSTITUTION_SOURCE_NAME_PART, // {{source_name_part}} | 27 SUBSTITUTION_SOURCE_NAME_PART, // {{source_name_part}} |
| 28 SUBSTITUTION_SOURCE_FILE_PART, // {{source_file_part}} | 28 SUBSTITUTION_SOURCE_FILE_PART, // {{source_file_part}} |
| 29 SUBSTITUTION_SOURCE_DIR, // {{source_dir}} | 29 SUBSTITUTION_SOURCE_DIR, // {{source_dir}} |
| 30 SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR, // {{root_relative_dir}} | 30 SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR, // {{root_relative_dir}} |
| 31 SUBSTITUTION_SOURCE_GEN_DIR, // {{source_gen_dir}} | 31 SUBSTITUTION_SOURCE_GEN_DIR, // {{source_gen_dir}} |
| 32 SUBSTITUTION_SOURCE_OUT_DIR, // {{source_out_dir}} | 32 SUBSTITUTION_SOURCE_OUT_DIR, // {{source_out_dir}} |
| 33 | 33 |
| 34 // Valid for all compiler and linker tools. These depend on the target and | 34 // Valid for all compiler and linker tools. These depend on the target and |
| 35 // no not vary on a per-file basis. | 35 // do not vary on a per-file basis. |
| 36 SUBSTITUTION_LABEL, // {{label}} | 36 SUBSTITUTION_LABEL, // {{label}} |
| 37 SUBSTITUTION_LABEL_NAME, // {{label_name}} | 37 SUBSTITUTION_LABEL_NAME, // {{label_name}} |
| 38 SUBSTITUTION_ROOT_GEN_DIR, // {{root_gen_dir}} | 38 SUBSTITUTION_ROOT_GEN_DIR, // {{root_gen_dir}} |
| 39 SUBSTITUTION_ROOT_OUT_DIR, // {{root_out_dir}} | 39 SUBSTITUTION_ROOT_OUT_DIR, // {{root_out_dir}} |
| 40 SUBSTITUTION_TARGET_GEN_DIR, // {{target_gen_dir}} | 40 SUBSTITUTION_TARGET_GEN_DIR, // {{target_gen_dir}} |
| 41 SUBSTITUTION_TARGET_OUT_DIR, // {{target_out_dir}} | 41 SUBSTITUTION_TARGET_OUT_DIR, // {{target_out_dir}} |
| 42 SUBSTITUTION_TARGET_OUTPUT_NAME, // {{target_output_name}} | 42 SUBSTITUTION_TARGET_OUTPUT_NAME, // {{target_output_name}} |
| 43 | 43 |
| 44 // Valid for compiler tools. | 44 // Valid for compiler tools. |
| 45 SUBSTITUTION_ASMFLAGS, // {{asmflags}} | 45 SUBSTITUTION_ASMFLAGS, // {{asmflags}} |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // Returns true if the given substitution is valid for the named purpose. | 110 // Returns true if the given substitution is valid for the named purpose. |
| 111 bool IsValidBundleDataSubstitution(SubstitutionType type); | 111 bool IsValidBundleDataSubstitution(SubstitutionType type); |
| 112 bool IsValidSourceSubstitution(SubstitutionType type); | 112 bool IsValidSourceSubstitution(SubstitutionType type); |
| 113 // Both compiler and linker tools. | 113 // Both compiler and linker tools. |
| 114 bool IsValidToolSubstitution(SubstitutionType type); | 114 bool IsValidToolSubstitution(SubstitutionType type); |
| 115 bool IsValidCompilerSubstitution(SubstitutionType type); | 115 bool IsValidCompilerSubstitution(SubstitutionType type); |
| 116 bool IsValidCompilerOutputsSubstitution(SubstitutionType type); | 116 bool IsValidCompilerOutputsSubstitution(SubstitutionType type); |
| 117 bool IsValidLinkerSubstitution(SubstitutionType type); | 117 bool IsValidLinkerSubstitution(SubstitutionType type); |
| 118 bool IsValidLinkerOutputsSubstitution(SubstitutionType type); | 118 bool IsValidLinkerOutputsSubstitution(SubstitutionType type); |
| 119 bool IsValidCopySubstitution(SubstitutionType type); | 119 bool IsValidCopySubstitution(SubstitutionType type); |
| 120 bool IsValidCompileXCassetsSubstitution(SubstitutionType type); |
| 120 | 121 |
| 121 // Like the "IsValid..." version above but checks a list of types and sets a | 122 // Like the "IsValid..." version above but checks a list of types and sets a |
| 122 // an error blaming the given source if the test fails. | 123 // an error blaming the given source if the test fails. |
| 123 bool EnsureValidSourcesSubstitutions( | 124 bool EnsureValidSourcesSubstitutions( |
| 124 const std::vector<SubstitutionType>& types, | 125 const std::vector<SubstitutionType>& types, |
| 125 const ParseNode* origin, | 126 const ParseNode* origin, |
| 126 Err* err); | 127 Err* err); |
| 127 | 128 |
| 128 #endif // TOOLS_GN_SUBSTITUTION_TYPE_H_ | 129 #endif // TOOLS_GN_SUBSTITUTION_TYPE_H_ |
| OLD | NEW |