[llvm] r331821 - MC: Remove dead code. NFCI.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 21:55:04 PDT 2018


Sorry, what i meant was that at the time that I committed I thought that it
was dead but I later realised that it could have been reached with asm
specifically designed to reach it like the asm in my earlier message. I
don't think that anyone would ever actually write asm like that, though.

Petet

On Tue, May 8, 2018, 21:40 Daniel Sanders <daniel_l_sanders at apple.com>
wrote:

> It seems strange to me that it's both dead and reachable but admittedly I
> don't know this code very well. I mostly commented because it struck me as
> odd when I was going through the possible commits in the blamelist for the
> bot failures
>
> On 8 May 2018, at 18:47, Peter Collingbourne <peter at pcc.me.uk> wrote:
>
> 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/20180509/53f9c6dd/attachment.html>


More information about the llvm-commits mailing list