From 8a5cbadff95ba66bc0f9754d980bc59d455da037 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 27 Aug 2013 04:27:18 +0000 Subject: [PATCH] Fix use of temporary strings. llvm-svn: 189310 --- lld/lib/Driver/WinLinkDriver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp index 64ad9cba853a..1a0602c58489 100644 --- a/lld/lib/Driver/WinLinkDriver.cpp +++ b/lld/lib/Driver/WinLinkDriver.cpp @@ -350,12 +350,12 @@ bool WinLinkDriver::parse(int argc, const char *argv[], case OPT_entry: // handle /entry - ctx.setEntrySymbolName(inputArg->getValue()); + ctx.setEntrySymbolName(ctx.allocateString(inputArg->getValue())); break; case OPT_libpath: // handle /libpath - ctx.appendInputSearchPath(inputArg->getValue()); + ctx.appendInputSearchPath(ctx.allocateString(inputArg->getValue())); break; case OPT_force: @@ -408,12 +408,12 @@ bool WinLinkDriver::parse(int argc, const char *argv[], case OPT_incl: // handle /incl - ctx.addInitialUndefinedSymbol(inputArg->getValue()); + ctx.addInitialUndefinedSymbol(ctx.allocateString(inputArg->getValue())); break; case OPT_out: // handle /out - ctx.setOutputPath(inputArg->getValue()); + ctx.setOutputPath(ctx.allocateString(inputArg->getValue())); break; case OPT_INPUT: {