<div dir="ltr">Next time, can you please follow the following conventions?<div><br></div><div>- Write a short summary of the commit on the first line (less than 80 columns are preferred.)</div><div>- Wrap lines to 80 columns in the body text.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 29, 2016 at 7:30 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">LGTM</p>
<div class="gmail_quote">2016/01/29 午前2:56 "George Rimar via llvm-commits" <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>>:<div><div class="h5"><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: grimar<br>
Date: Fri Jan 29 04:52:52 2016<br>
New Revision: 259186<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=259186&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=259186&view=rev</a><br>
Log:<br>
Replace StringRef with std::string in LinkerDriver::addLibrary(StringRef Name) because std::string is destroyed after assigning what fills the buffer with garbage and StringRef is no more valid.<br>
That fixes few failing tests under windows+msvs2015(debug).<br>
<br>
Modified:<br>
    lld/trunk/ELF/Driver.cpp<br>
<br>
Modified: lld/trunk/ELF/Driver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=259186&r1=259185&r2=259186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=259186&r1=259185&r2=259186&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Driver.cpp (original)<br>
+++ lld/trunk/ELF/Driver.cpp Fri Jan 29 04:52:52 2016<br>
@@ -114,7 +114,7 @@ void LinkerDriver::addFile(StringRef Pat<br>
<br>
 // Add a given library by searching it from input search paths.<br>
 void LinkerDriver::addLibrary(StringRef Name) {<br>
-  StringRef Path = searchLibrary(Name);<br>
+  std::string Path = searchLibrary(Name);<br>
   if (Path.empty())<br>
     error("Unable to find library -l" + Name);<br>
   else<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div></div>
</blockquote></div><br></div>