[TableGen][X86] getValueAsString returns a std::string not a StringRef. Capture it...
authorCraig Topper <craig.topper@gmail.com>
Sun, 28 May 2017 17:48:41 +0000 (17:48 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 28 May 2017 17:48:41 +0000 (17:48 +0000)
llvm-svn: 304093

llvm/utils/TableGen/X86FoldTablesEmitter.cpp

index 4d860cb..c2ca573 100644 (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");