<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 24, 2015 at 2:39 PM, Joerg Sonnenberger via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Nov 24, 2015 at 10:26:33PM -0000, Rui Ueyama via llvm-commits wrote:<br>
> Modified: lld/trunk/ELF/LinkerScript.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=254032&r1=254031&r2=254032&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=254032&r1=254031&r2=254032&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/LinkerScript.cpp (original)<br>
> +++ lld/trunk/ELF/LinkerScript.cpp Tue Nov 24 16:26:33 2015<br>
> @@ -297,14 +297,17 @@ void LinkerScript::readOutputSectionDesc<br>
>    }<br>
>  }<br>
><br>
> +static bool isUnderSysroot(StringRef Path) {<br>
> +  if (Config->Sysroot == "")<br>
> +    return false;<br>
> +  for (; !Path.empty(); Path = sys::path::parent_path(Path))<br>
> +    if (sys::fs::equivalent(Config->Sysroot, Path))<br>
> +      return true;<br>
> +  return false;<br>
> +}<br>
<br>
</span>Can you change it back to use .empty()?<br></blockquote><div><br></div><div>Is that preferred? I changed that since Config::Sysroot type is not very obvious in this context (I thought for a while about whether it is a vector or a StringRef). I thought that this would improve readability.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Joerg<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">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>
</div></div></blockquote></div><br></div></div>