fix a critical bug where the generated table would say
authorChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 03:11:10 +0000 (03:11 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 03:11:10 +0000 (03:11 +0000)
"1 strings to match" in a comment, which isn't gramatic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113140 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/StringMatcher.cpp

index 2d2f77357886f27c00ecf669f4e74771f814ba00..ccd01d253ff989b0c7baf498975251e980ffb36c 100644 (file)
@@ -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";
   }