mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user