<div dir="ltr">Hmm, it wouldn't actually be unreachable, you can reach it like this:<div><br></div><div><div>.section .foo,"a",@11</div></div><div><br></div><div>If we encounter input like that, doing nothing is an acceptable thing to do.</div><div><br></div><div>Peter</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 8, 2018 at 5:50 PM, Daniel Sanders <span dir="ltr"><<a href="mailto:daniel_l_sanders@apple.com" target="_blank">daniel_l_sanders@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Peter,<br>
<br>
Shouldn't it call llvm_unreachable() so that an asserts build fails noisily rather than silently doing nothing?<br>
<div class="HOEnZb"><div class="h5"><br>
> On 8 May 2018, at 15:59, Peter Collingbourne via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> <br>
> Author: pcc<br>
> Date: Tue May  8 15:59:05 2018<br>
> New Revision: 331821<br>
> <br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=331821&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=331821&view=rev</a><br>
> Log:<br>
> MC: Remove dead code. NFCI.<br>
> <br>
> We should never emit an SHT_DYNSYM into an object file.<br>
> <br>
> Modified:<br>
>    llvm/trunk/lib/MC/<wbr>ELFObjectWriter.cpp<br>
> <br>
> Modified: llvm/trunk/lib/MC/<wbr>ELFObjectWriter.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=331821&r1=331820&r2=331821&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/MC/<wbr>ELFObjectWriter.cpp?rev=<wbr>331821&r1=331820&r2=331821&<wbr>view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- llvm/trunk/lib/MC/<wbr>ELFObjectWriter.cpp (original)<br>
> +++ llvm/trunk/lib/MC/<wbr>ELFObjectWriter.cpp Tue May  8 15:59:05 2018<br>
> @@ -1149,7 +1149,6 @@ void ELFObjectWriter::writeSection(<wbr>const<br>
>   }<br>
> <br>
>   case ELF::SHT_SYMTAB:<br>
> -  case ELF::SHT_DYNSYM:<br>
>     sh_link = StringTableIndex;<br>
>     sh_info = LastLocalSymbolIndex;<br>
>     break;<br>
> <br>
> <br>
> ______________________________<wbr>_________________<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/<wbr>mailman/listinfo/llvm-commits</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div>