Home | History | Annotate | Download | only in TableGen

Lines Matching refs:Matches

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