summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-10-25 22:59:40 +0000
committerRui Ueyama <ruiu@google.com>2013-10-25 22:59:40 +0000
commit8870301763103f6686fcc5f17ed7dd52543e2ffd (patch)
treec30d60e1578e9d01f4ff869d428f8c167e3c14ba
parent1b6456101327096f04ac12fe7e65345c63a15f79 (diff)
downloadbcm5719-llvm-8870301763103f6686fcc5f17ed7dd52543e2ffd.tar.gz
bcm5719-llvm-8870301763103f6686fcc5f17ed7dd52543e2ffd.zip
[PECOFF] Fix use-after-return.
llvm-svn: 193446
-rw-r--r--lld/lib/Driver/WinLinkDriver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index 73af12b2bd2..6008887881b 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -374,7 +374,7 @@ bool createManifest(PECOFFLinkingContext &ctx, raw_ostream &diagnostics) {
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;
}
OpenPOWER on IntegriCloud