[llvm] r304123 - Don't capture a temporary std::string in a StringRef.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun May 28 19:33:17 PDT 2017
How did you narrow it down to that?
~Craig
On Sun, May 28, 2017 at 7:20 PM, Zachary Turner via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: zturner
> Date: Sun May 28 21:20:12 2017
> New Revision: 304123
>
> URL: http://llvm.org/viewvc/llvm-project?rev=304123&view=rev
> Log:
> Don't capture a temporary std::string in a StringRef.
>
> This fixes the breakages in llvm-tblgen.
>
> 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=304123&r1=304122&r2=304123&view=diff
> ============================================================
> ==================
> --- llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp (original)
> +++ llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp Sun May 28
> 21:20:12 2017
> @@ -285,7 +285,7 @@ getMemOperandSize(const Record *MemRec,
> (MemRec->getName() == "sdmem" || MemRec->getName() == "ssmem"))
> return 128;
>
> - StringRef Name =
> + std::string Name =
> MemRec->getValueAsDef("ParserMatchClass")->
> getValueAsString("Name");
> if (Name == "Mem8")
> return 8;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170528/d1c67558/attachment.html>
More information about the llvm-commits
mailing list