[llvm] r331821 - MC: Remove dead code. NFCI.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Tue May 8 18:47:06 PDT 2018
Hmm, it wouldn't actually be unreachable, you can reach it like this:
.section .foo,"a", at 11
If we encounter input like that, doing nothing is an acceptable thing to do.
Peter
On Tue, May 8, 2018 at 5:50 PM, Daniel Sanders <daniel_l_sanders at apple.com>
wrote:
> Hi Peter,
>
> Shouldn't it call llvm_unreachable() so that an asserts build fails
> noisily rather than silently doing nothing?
>
> > On 8 May 2018, at 15:59, Peter Collingbourne via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >
> > Author: pcc
> > Date: Tue May 8 15:59:05 2018
> > New Revision: 331821
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=331821&view=rev
> > Log:
> > MC: Remove dead code. NFCI.
> >
> > We should never emit an SHT_DYNSYM into an object file.
> >
> > Modified:
> > llvm/trunk/lib/MC/ELFObjectWriter.cpp
> >
> > Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/
> ELFObjectWriter.cpp?rev=331821&r1=331820&r2=331821&view=diff
> > ============================================================
> ==================
> > --- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
> > +++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Tue May 8 15:59:05 2018
> > @@ -1149,7 +1149,6 @@ void ELFObjectWriter::writeSection(const
> > }
> >
> > case ELF::SHT_SYMTAB:
> > - case ELF::SHT_DYNSYM:
> > sh_link = StringTableIndex;
> > sh_info = LastLocalSymbolIndex;
> > break;
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
--
--
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180508/67f83ad1/attachment.html>
More information about the llvm-commits
mailing list