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

Unified Diff: tools/gn/label_pattern.cc

Issue 937003002: Enhance GN introspection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: tools/gn/label_pattern.cc
diff --git a/tools/gn/label_pattern.cc b/tools/gn/label_pattern.cc
index 4b31174d946dfb2f64f8834f31e00b2b1dc3e1b5..712826fe562e0c042df803bbe90d5237dba6d0fc 100644
--- a/tools/gn/label_pattern.cc
+++ b/tools/gn/label_pattern.cc
@@ -216,6 +216,12 @@ LabelPattern LabelPattern::GetPattern(const SourceDir& current_dir,
return LabelPattern(type, dir, base::StringPiece(), toolchain_label);
}
+bool LabelPattern::HasWildcard(const std::string& str) {
+ // Just look for a star. In the future, we may want to handle escaping or
+ // other types of patterns.
+ return str.find('*') != std::string::npos;
+}
+
bool LabelPattern::Matches(const Label& label) const {
if (!toolchain_.is_null()) {
// Toolchain must match exactly.
« tools/gn/commands.cc ('K') | « tools/gn/label_pattern.h ('k') | tools/gn/output_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698