<div dir="ltr">LGTM</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 23, 2013 at 6:51 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Modified portion of the patch is:<br>
<div class="im"><br>
    // If the argument does not end in .lib, automatically add the suffix. This<br>
</div><div class="im">    // matches the behavior of MSVC.<br>
</div><div class="im">    std::string ArgStr = Arg;<br>
</div>    if (Arg.size() <= 4 ||<br>
        Arg.substr(Arg.size() - 4).compare_lower(".lib") != 0) {<br>
      ArgStr += ".lib";<br>
    }<br>
    Consumer.HandleDependentLibrary(ArgStr);<br>
    return;<br>
<br>
~Aaron<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, May 23, 2013 at 5:07 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
> On Thu, May 23, 2013 at 5:05 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
>> On Thu, May 23, 2013 at 5:02 PM, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
>>> -    Consumer.HandleDependentLibrary(Arg);<br>
>>> +    // If the argument does not end in .lib, automatically add the suffix.<br>
>>> This<br>
>>> +    // matches the behavior of MSVC.<br>
>>> +    std::string ArgStr = Arg;<br>
>>> +    StringRef End = Arg.substr( Arg.size() - 4 );<br>
>>><br>
>>> Looks like it's not safe if Arg.size() < 4.<br>
>><br>
>> Hmm, that's a good point due to the unsigned subtraction.  Easy enough<br>
>> to resolve.<br>
><br>
> Also, just caught the formatting issue with the extra spaces; also<br>
> easy enough to resolve.<br>
><br>
> ~Aaron<br>
</div></div></blockquote></div><br></div>