[lld] r189151 - Fixes an additional temporary string use.

Rui Ueyama ruiu at google.com
Fri Aug 23 15:06:30 PDT 2013


Author: ruiu
Date: Fri Aug 23 17:06:29 2013
New Revision: 189151

URL: http://llvm.org/viewvc/llvm-project?rev=189151&view=rev
Log:
Fixes an additional temporary string use.

Patch by Ron Ofir.

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=189151&r1=189150&r2=189151&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Fri Aug 23 17:06:29 2013
@@ -410,7 +410,7 @@ bool WinLinkDriver::parse(int argc, cons
     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.





More information about the llvm-commits mailing list