From 07b332f0a0d4dd21962d2b19e4f3b80682afdecd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 6 Sep 2010 03:58:45 +0000 Subject: emit the LLVM intrinsic name -> intrinsic number mapping table with StringMatcher instead of a linear sequence of memcmps. llvm-svn: 113145 --- llvm/utils/TableGen/StringMatcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/utils/TableGen/StringMatcher.cpp') diff --git a/llvm/utils/TableGen/StringMatcher.cpp b/llvm/utils/TableGen/StringMatcher.cpp index 68fbe7fcf31..1c43b6d1c8a 100644 --- a/llvm/utils/TableGen/StringMatcher.cpp +++ b/llvm/utils/TableGen/StringMatcher.cpp @@ -78,9 +78,9 @@ EmitStringMatcherForChar(const std::vector &Matches, << Matches[0]->first[CharNo] << "')\n"; OS << Indent << " break;\n"; } else { - // Do the comparison with if (Str.substr(1,3) != "foo"). + // Do the comparison with if (Str.substr(1, 3) != "foo"). // FIXME: Need to escape general strings. - OS << Indent << "if (" << StrVariableName << ".substr(" << CharNo << "," + OS << Indent << "if (" << StrVariableName << ".substr(" << CharNo << ", " << NumChars << ") != \""; OS << Matches[0]->first.substr(CharNo, NumChars) << "\")\n"; OS << Indent << " break;\n"; -- cgit v1.2.3