summaryrefslogtreecommitdiff
path: root/utils/TableGen/StringMatcher.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-06 03:58:45 +0000
committerChris Lattner <sabre@nondot.org>2010-09-06 03:58:45 +0000
commitcc67c75b67d22653ea9380020e9a40381233901d (patch)
treebe2f97ccbbb809a87e6ed7f18c36c59eb65b533d /utils/TableGen/StringMatcher.cpp
parent09981982f13085d5e7fd5fb8f87b4a626d770c5f (diff)
downloadllvm-cc67c75b67d22653ea9380020e9a40381233901d.tar.gz
llvm-cc67c75b67d22653ea9380020e9a40381233901d.tar.bz2
llvm-cc67c75b67d22653ea9380020e9a40381233901d.tar.xz
emit the LLVM intrinsic name -> intrinsic number mapping table with
StringMatcher instead of a linear sequence of memcmps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/StringMatcher.cpp')
-rw-r--r--utils/TableGen/StringMatcher.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/StringMatcher.cpp b/utils/TableGen/StringMatcher.cpp
index 68fbe7fcf3..1c43b6d1c8 100644
--- a/utils/TableGen/StringMatcher.cpp
+++ b/utils/TableGen/StringMatcher.cpp
@@ -78,9 +78,9 @@ EmitStringMatcherForChar(const std::vector<const StringPair*> &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";