<div dir="ltr">No worries, I already fixed it.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 22, 2017 at 10:36 AM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Oops. I forgot to put the unreachable after the switch. I will fix that when I get back from lunch.<br>
<br>
Cheers,<br>
Rafael<div><div class="h5"><br><br><div class="gmail_quote">On February 22, 2017 12:53:10 PM EST, Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Huh, that's right. Maybe it was an MSVC thing that it cannot defer that the end of function is unreachable.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 22, 2017 at 6:17 AM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_6626619416369587185HOEnZb"><div class="m_6626619416369587185h5">Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> writes:<br>
<br>
> On Tue, Feb 21, 2017 at 12:40 PM, Rafael Espindola via llvm-commits <<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
>> Author: rafael<br>
>> Date: Tue Feb 21 14:40:54 2017<br>
>> New Revision: 295765<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=295765&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=295765&view=rev</a><br>
>> Log:<br>
>> Don't modify archive members unless really needed.<br>
>><br>
>> For whatever reason ld64 requires that member headers (not the member<br>
>> themselves) should be aligned. The only way to do that is to edit the<br>
>> previous member so that it ends at an aligned boundary.<br>
>><br>
>> Since modifying data put in an archive is an undesirable property,<br>
>> llvm-ar should only do it when it is absolutely necessary.<br>
>><br>
>> Added:<br>
>>     llvm/trunk/test/Object/archiv<wbr>e-pad.test<br>
>> Modified:<br>
>>     llvm/trunk/include/llvm/Objec<wbr>t/Archive.h<br>
>>     llvm/trunk/lib/Object/Archive<wbr>Writer.cpp<br>
>>     llvm/trunk/test/Object/archiv<wbr>e-extract.test<br>
>>     llvm/trunk/test/Object/archiv<wbr>e-format.test<br>
>>     llvm/trunk/tools/llvm-ar/<wbr>llvm-ar.cpp<br>
>><br>
>> Modified: llvm/trunk/include/llvm/Object<wbr>/Archive.h<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/include/</a><br>
>> llvm/Object/Archive.h?rev=2957<wbr>65&r1=295764&r2=295765&view=<wbr>diff<br>
>> ==============================<wbr>==============================<br>
>> ==================<br>
>> --- llvm/trunk/include/llvm/Object<wbr>/Archive.h (original)<br>
>> +++ llvm/trunk/include/llvm/Object<wbr>/Archive.h Tue Feb 21 14:40:54 2017<br>
>> @@ -212,6 +212,7 @@ public:<br>
>>      K_GNU,<br>
>>      K_MIPS64,<br>
>>      K_BSD,<br>
>> +    K_DARWIN,<br>
>>      K_DARWIN64,<br>
>>      K_COFF<br>
>>    };<br>
>><br>
>> Modified: llvm/trunk/lib/Object/ArchiveW<wbr>riter.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/Object/</a><br>
>> ArchiveWriter.cpp?rev=295765&r<wbr>1=295764&r2=295765&view=diff<br>
>> ==============================<wbr>==============================<br>
>> ==================<br>
>> --- llvm/trunk/lib/Object/ArchiveW<wbr>riter.cpp (original)<br>
>> +++ llvm/trunk/lib/Object/ArchiveW<wbr>riter.cpp Tue Feb 21 14:40:54 2017<br>
>> @@ -122,12 +122,26 @@ static void printWithSpacePadding(raw_fd<br>
>>    }<br>
>>  }<br>
>><br>
>> +static bool isBSDLike(object::Archive::Kin<wbr>d Kind) {<br>
>> +  switch (Kind) {<br>
>> +  case object::Archive::K_GNU:<br>
>> +    return false;<br>
>> +  case object::Archive::K_BSD:<br>
>> +  case object::Archive::K_DARWIN:<br>
>> +    return true;<br>
>> +  case object::Archive::K_MIPS64:<br>
>> +  case object::Archive::K_DARWIN64:<br>
>> +  case object::Archive::K_COFF:<br>
>> +    llvm_unreachable("not supported for writting");<br>
>> +  }<br>
>> +}<br>
>><br>
><br>
> This `switch` doesn't cover all Kind enums, which is bad because this<br>
> function should return a value.<br>
<br>
</div></div>I am pretty sure it covers all the enum values. Which one do you think<br>
is missing?<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>
</blockquote></div><br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</font></span></div></blockquote></div><br></div>