Skip to content

Commit e26e2c0

Browse files
committed
Update local
Created using spr 1.3.6
1 parent 534d49d commit e26e2c0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

llvm/lib/Support/SpecialCaseList.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ Error SpecialCaseList::Matcher::insert(StringRef Pattern, unsigned LineNumber,
6767
}
6868

6969
unsigned SpecialCaseList::Matcher::match(StringRef Query) const {
70-
for (const auto &[Pattern, Pair] : Globs)
71-
if (Pair.first.match(Query))
72-
return Pair.second;
70+
for (const auto &glob : this->Globs) {
71+
llvm::outs() << "Match: " << glob.first << " Line number: " << glob.second.second << "\n";
72+
if (glob.second.first.match(Query))
73+
return glob.second.second;
74+
}
7375
for (const auto &[Regex, LineNumber] : RegExes)
7476
if (Regex->match(Query))
7577
return LineNumber;
@@ -227,13 +229,19 @@ unsigned SpecialCaseList::inSectionBlame(StringRef Section, StringRef Prefix,
227229
unsigned SpecialCaseList::inSectionBlame(const SectionEntries &Entries,
228230
StringRef Prefix, StringRef Query,
229231
StringRef Category) const {
232+
llvm::outs() << "Input Arguments. Prefix: " << Prefix << " Query: " << Query
233+
<< " Category: " << Category << " \n";
230234
SectionEntries::const_iterator I = Entries.find(Prefix);
231235
if (I == Entries.end())
232236
return 0;
233237
StringMap<Matcher>::const_iterator II = I->second.find(Category);
238+
234239
if (II == I->second.end())
235240
return 0;
236241

242+
for (const auto& glob : II->getValue().Globs) {
243+
llvm::outs() << "glob pattern: " << glob.first << " line number: " << glob.second.second << "\n";
244+
}
237245
return II->getValue().match(Query);
238246
}
239247

0 commit comments

Comments
 (0)