Don't capture a temporary std::string in a StringRef.

This fixes the breakages in llvm-tblgen.

llvm-svn: 304123
This commit is contained in:
Zachary Turner 2017-05-29 02:20:12 +00:00
parent df1832cf86
commit eaacd07079
1 changed files with 1 additions and 1 deletions

View File

@ -285,7 +285,7 @@ getMemOperandSize(const Record *MemRec, const bool IntrinsicSensitive = false) {
(MemRec->getName() == "sdmem" || MemRec->getName() == "ssmem"))
return 128;
StringRef Name =
std::string Name =
MemRec->getValueAsDef("ParserMatchClass")->getValueAsString("Name");
if (Name == "Mem8")
return 8;