[PATCH] [lld]Fix a temporary string use

Rui Ueyama ruiu at google.com
Fri Aug 23 14:50:57 PDT 2013


LGTM


On Fri, Aug 23, 2013 at 2:50 PM, Ron Ofir <ron.ofir at gmail.com> wrote:

> Hi ruiu, shankarke,
>
> Fixes an additional temporary string use
>
> http://llvm-reviews.chandlerc.com/D1494
>
> Files:
>   lib/Driver/WinLinkDriver.cpp
>
> Index: lib/Driver/WinLinkDriver.cpp
> ===================================================================
> --- lib/Driver/WinLinkDriver.cpp
> +++ lib/Driver/WinLinkDriver.cpp
> @@ -410,7 +410,7 @@
>      SmallString<128> firstInputFilePath =
>          (llvm::dyn_cast<FileNode>(&((inputGraph)[0])))->path(ctx);
>      (llvm::sys::path::replace_extension(firstInputFilePath, ".exe"));
> -    ctx.setOutputPath(firstInputFilePath.str());
> +    ctx.setOutputPath(ctx.allocateString(firstInputFilePath.str()));
>    }
>
>    // Validate the combination of options used.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130823/d7591762/attachment.html>


More information about the llvm-commits mailing list