Lines Matching refs:Matches
24 StringMatcher::StringPair*> &Matches) { in FindFirstNonCommonLetter() argument
25 assert(!Matches.empty()); in FindFirstNonCommonLetter()
26 for (unsigned i = 0, e = Matches[0]->first.size(); i != e; ++i) { in FindFirstNonCommonLetter()
28 char Letter = Matches[0]->first[i]; in FindFirstNonCommonLetter()
30 for (unsigned str = 0, e = Matches.size(); str != e; ++str) in FindFirstNonCommonLetter()
31 if (Matches[str]->first[i] != Letter) in FindFirstNonCommonLetter()
35 return Matches[0]->first.size(); in FindFirstNonCommonLetter()
44 EmitStringMatcherForChar(const std::vector<const StringPair*> &Matches, in EmitStringMatcherForChar() argument
46 assert(!Matches.empty() && "Must have at least one string to match!"); in EmitStringMatcherForChar()
51 if (CharNo == Matches[0]->first.size()) { in EmitStringMatcherForChar()
52 assert(Matches.size() == 1 && "Had duplicate keys to match on"); in EmitStringMatcherForChar()
55 StringRef Code = Matches[0]->second; in EmitStringMatcherForChar()
58 OS << Indent << Split.first << "\t // \"" << Matches[0]->first << "\"\n"; in EmitStringMatcherForChar()
72 for (unsigned i = 0, e = Matches.size(); i != e; ++i) in EmitStringMatcherForChar()
73 MatchesByLetter[Matches[i]->first[CharNo]].push_back(Matches[i]); in EmitStringMatcherForChar()
79 unsigned FirstNonCommonLetter = FindFirstNonCommonLetter(Matches); in EmitStringMatcherForChar()
87 << Matches[0]->first[CharNo] << "')\n"; in EmitStringMatcherForChar()
93 << ", \"" << Matches[0]->first.substr(CharNo, NumChars) << "\", " in EmitStringMatcherForChar()
98 return EmitStringMatcherForChar(Matches, FirstNonCommonLetter, IndentCount); in EmitStringMatcherForChar()
126 if (Matches.empty()) return; in Emit()
131 for (unsigned i = 0, e = Matches.size(); i != e; ++i) in Emit()
132 MatchesByLength[Matches[i].first.size()].push_back(&Matches[i]); in Emit()