[llvm] r284513 - revert r284495: [Target] remove TargetRecip class

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 13:00:25 PDT 2016


For reference, I think I fixed the problem in r284746.

I had code like this:
StringRef VTName = getReciprocalOpName(IsSqrt, VT); // this returns
std::string

So the std::string that is returned could be deleted leaving the StringRef
dangling. The fix was to assign to a std::string instead.



On Tue, Oct 18, 2016 at 4:40 PM, Tim Northover <t.p.northover at gmail.com>
wrote:

> On 18 October 2016 at 15:13, Sanjay Patel <spatel at rotateright.com> wrote:
> > Is a solution to return a std::string rather than a StringRef because the
> > string will then be an actual copy rather than a reference?
>
> Oh, actually it looks like I was mistaken. I didn't see that
> getValueAsString and getAsString were different when I looked at the
> docs.
>
> I can't see anything else obviously wrong either. I'll try to take a
> better look in a bit, but I've got 3 independent bot failures on my
> hands now and no real clue about any of them so it may take a while.
>
> Sorry.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161020/705d587b/attachment.html>


More information about the llvm-commits mailing list