diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-06 03:11:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-06 03:11:10 +0000 |
commit | 9bb3bf1b593b9d656938cf21de61a991f2255f14 (patch) | |
tree | c5bd3712ea2d57176435fcc2f5b67401ce5e2500 /llvm/utils/TableGen/StringMatcher.cpp | |
parent | 69b591350081237085e4ee37e5895f9a00ff128a (diff) | |
download | bcm5719-llvm-9bb3bf1b593b9d656938cf21de61a991f2255f14.tar.gz bcm5719-llvm-9bb3bf1b593b9d656938cf21de61a991f2255f14.zip |
fix a critical bug where the generated table would say
"1 strings to match" in a comment, which isn't gramatic.
llvm-svn: 113140
Diffstat (limited to 'llvm/utils/TableGen/StringMatcher.cpp')
-rw-r--r-- | llvm/utils/TableGen/StringMatcher.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/StringMatcher.cpp b/llvm/utils/TableGen/StringMatcher.cpp index 2d2f7735788..ccd01d253ff 100644 --- a/llvm/utils/TableGen/StringMatcher.cpp +++ b/llvm/utils/TableGen/StringMatcher.cpp @@ -98,7 +98,9 @@ EmitStringMatcherForChar(const std::vector<const StringPair*> &Matches, MatchesByLetter.begin(), E = MatchesByLetter.end(); LI != E; ++LI) { // TODO: escape hard stuff (like \n) if we ever care about it. OS << Indent << "case '" << LI->first << "':\t // " - << LI->second.size() << " strings to match.\n"; + << LI->second.size() << " string"; + if (LI->second.size() != 1) OS << 's'; + OS << " to match.\n"; if (EmitStringMatcherForChar(LI->second, CharNo+1, IndentCount+1)) OS << Indent << " break;\n"; } |