1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[TableGen][X86] getValueAsString returns a std::string not a StringRef. Capture it that way to avoid a StringRef to a temporary.

llvm-svn: 304093
This commit is contained in:
Craig Topper 2017-05-28 17:48:41 +00:00
parent 05a09def7a
commit 113510488b

View File

@ -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");