[llvm] r304093 - [TableGen][X86] getValueAsString returns a std::string not a StringRef. Capture it that way to avoid a StringRef to a temporary.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun May 28 10:48:41 PDT 2017
Author: ctopper
Date: Sun May 28 12:48:41 2017
New Revision: 304093
URL: http://llvm.org/viewvc/llvm-project?rev=304093&view=rev
Log:
[TableGen][X86] getValueAsString returns a std::string not a StringRef. Capture it that way to avoid a StringRef to a temporary.
Modified:
llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp
Modified: llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp?rev=304093&r1=304092&r2=304093&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp Sun May 28 12:48:41 2017
@@ -360,7 +360,7 @@ static inline const CodeGenInstruction *
getAltRegInst(const CodeGenInstruction *I, const RecordKeeper &Records,
const CodeGenTarget &Target) {
- StringRef AltRegInstStr = I->TheDef->getValueAsString("FoldGenRegForm");
+ std::string AltRegInstStr = I->TheDef->getValueAsString("FoldGenRegForm");
Record *AltRegInstRec = Records.getDef(AltRegInstStr);
assert(AltRegInstRec &&
"Alternative register form instruction def not found");
More information about the llvm-commits
mailing list