[lld] r193446 - [PECOFF] Fix use-after-return.

Rui Ueyama ruiu at google.com
Fri Oct 25 15:59:40 PDT 2013


Author: ruiu
Date: Fri Oct 25 17:59:40 2013
New Revision: 193446

URL: http://llvm.org/viewvc/llvm-project?rev=193446&view=rev
Log:
[PECOFF] Fix use-after-return.

Modified:
    lld/trunk/lib/Driver/WinLinkDriver.cpp

Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=193446&r1=193445&r2=193446&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Fri Oct 25 17:59:40 2013
@@ -374,7 +374,7 @@ bool createManifest(PECOFFLinkingContext
     if (!createManifestResourceFile(ctx, diagnostics, resourceFilePath))
       return false;
     std::unique_ptr<InputElement> inputElement(
-        new PECOFFFileNode(ctx, resourceFilePath));
+        new PECOFFFileNode(ctx, ctx.allocateString(resourceFilePath)));
     ctx.inputGraph().addInputElement(std::move(inputElement));
     return true;
   }





More information about the llvm-commits mailing list