]> granicus.if.org Git - llvm/commitdiff
[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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304093 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/X86FoldTablesEmitter.cpp

index 4d860cbb16cd7635b6a2d2306ec86fe0a7b93eef..c2ca57348630b741238015fe7483ed3a23be58c6 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");