diff options
Diffstat (limited to 'llvm/lib/Support/GlobPattern.cpp')
| -rw-r--r-- | llvm/lib/Support/GlobPattern.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Support/GlobPattern.cpp b/llvm/lib/Support/GlobPattern.cpp index 7004adf461a0..f68abb644fa9 100644 --- a/llvm/lib/Support/GlobPattern.cpp +++ b/llvm/lib/Support/GlobPattern.cpp @@ -139,6 +139,7 @@ GlobPattern::create(StringRef S, std::optional<size_t> MaxSubPatterns) { // Store the prefix that does not contain any metacharacter. size_t PrefixSize = S.find_first_of("?*[{\\"); Pat.Prefix = S.substr(0, PrefixSize); + llvm::errs() << "GlobPattern::create: Prefix: " << Pat.Prefix << "\n"; if (PrefixSize == std::string::npos) return Pat; S = S.substr(PrefixSize); @@ -191,8 +192,17 @@ GlobPattern::SubGlobPattern::create(StringRef S) { } bool GlobPattern::match(StringRef S) const { - if (!S.consume_front(Prefix)) + int debug = 0; + if (S == "hello") { + llvm::errs() << "Prefix: " << Prefix << "\n"; + debug = 1; + } + if (!S.consume_front(Prefix)) { + if (debug == 1) { + llvm::errs() << "consume_front: " << Prefix << "\n"; + } return false; + } if (SubGlobs.empty() && S.empty()) return true; for (auto &Glob : SubGlobs) |
