Skip to content

Commit a975b6c

Browse files
committed
Update the example.
Created using spr 1.3.6
1 parent e26e2c0 commit a975b6c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

llvm/lib/Support/SpecialCaseList.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ Error SpecialCaseList::Matcher::insert(StringRef Pattern, unsigned LineNumber,
6868

6969
unsigned SpecialCaseList::Matcher::match(StringRef Query) const {
7070
for (const auto &glob : this->Globs) {
71-
llvm::outs() << "Match: " << glob.first << " Line number: " << glob.second.second << "\n";
71+
llvm::outs() << "Inside match: " << glob.first
72+
<< " Line number: " << glob.second.second << "\n";
7273
if (glob.second.first.match(Query))
7374
return glob.second.second;
7475
}
@@ -235,14 +236,15 @@ unsigned SpecialCaseList::inSectionBlame(const SectionEntries &Entries,
235236
if (I == Entries.end())
236237
return 0;
237238
StringMap<Matcher>::const_iterator II = I->second.find(Category);
238-
239239
if (II == I->second.end())
240240
return 0;
241241

242-
for (const auto& glob : II->getValue().Globs) {
243-
llvm::outs() << "glob pattern: " << glob.first << " line number: " << glob.second.second << "\n";
242+
const llvm::SpecialCaseList::Matcher &matcher = II->getValue();
243+
for (const auto &glob : matcher.Globs) {
244+
llvm::outs() << "Outside match: " << glob.first
245+
<< " line number: " << glob.second.second << "\n";
244246
}
245-
return II->getValue().match(Query);
247+
return matcher.match(Query);
246248
}
247249

248250
} // namespace llvm

0 commit comments

Comments
 (0)