diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-06 03:58:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-06 03:58:45 +0000 |
commit | cc67c75b67d22653ea9380020e9a40381233901d (patch) | |
tree | be2f97ccbbb809a87e6ed7f18c36c59eb65b533d /utils/TableGen/StringMatcher.cpp | |
parent | 09981982f13085d5e7fd5fb8f87b4a626d770c5f (diff) | |
download | external_llvm-cc67c75b67d22653ea9380020e9a40381233901d.zip external_llvm-cc67c75b67d22653ea9380020e9a40381233901d.tar.gz external_llvm-cc67c75b67d22653ea9380020e9a40381233901d.tar.bz2 |
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.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/StringMatcher.cpp b/utils/TableGen/StringMatcher.cpp index 68fbe7f..1c43b6d 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"; |