X86FoldTableEntry - avoid unnecessary std::string creation. NFCI.

llvm-svn: 329860
This commit is contained in:
Simon Pilgrim 2018-04-11 23:08:30 +00:00
parent 1ae61a6126
commit 4eb879c686
1 changed files with 3 additions and 3 deletions

View File

@ -106,8 +106,8 @@ class X86FoldTablesEmitter {
friend raw_ostream &operator<<(raw_ostream &OS,
const X86FoldTableEntry &E) {
OS << "{ X86::" << E.RegInst->TheDef->getName().str()
<< ", X86::" << E.MemInst->TheDef->getName().str() << ", ";
OS << "{ X86::" << E.RegInst->TheDef->getName()
<< ", X86::" << E.MemInst->TheDef->getName() << ", ";
if (E.IsLoad)
OS << "TB_FOLDED_LOAD | ";
@ -157,7 +157,7 @@ private:
// Print the given table as a static const C++ array of type
// X86MemoryFoldTableEntry.
void printTable(const FoldTable &Table, std::string TableName,
void printTable(const FoldTable &Table, StringRef TableName,
raw_ostream &OS) {
OS << "static const X86MemoryFoldTableEntry MemoryFold" << TableName
<< "[] = {\n";