[lld] r189035 - [lld][PECOFF] Fix one more reference to a temporary string

Shankar Easwaran shankare at codeaurora.org
Thu Aug 22 10:59:03 PDT 2013


Author: shankare
Date: Thu Aug 22 12:59:03 2013
New Revision: 189035

URL: http://llvm.org/viewvc/llvm-project?rev=189035&view=rev
Log:
[lld][PECOFF] Fix one more reference to a temporary string

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=189035&r1=189034&r2=189035&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Thu Aug 22 12:59:03 2013
@@ -201,7 +201,7 @@ StringRef PECOFFFileNode::path(const Lin
 
 StringRef PECOFFLibraryNode::path(const LinkingContext &) const {
   if (!_path.endswith(".lib"))
-    return _ctx.searchLibraryFile(_path.str() + ".lib");
+    return _ctx.searchLibraryFile(_ctx.allocateString(_path.str() + ".lib"));
   return _ctx.searchLibraryFile(_path);
 }
 





More information about the llvm-commits mailing list