[rfc][gold plugin] Fix pr19901

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Aug 11 15:24:05 PDT 2014


ping. Rebased patch attached.


On 6 August 2014 11:32, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
>> I don't think we drop them yet, but I see it is as just a convenience
>> so that it is easy to test it with llc. While developing this patch I
>> did a few clang bootstraps and only once noticed a unused linkonce_odr
>> in a .bc produced by clang. The previous passes should drop it. We
>> could add an option to do it, I am just not sure it would have a big
>> impact (I will write a patch to check).
>
> And I can't even reproduce that anymore.
>
> I applied the attached patch to llvm to make it assert when writing
> bitcode or assembly with a dead linkonce_odr. It will correctly crash
> in llvm-as or llc when given just
>
> define linkonce_odr void @g() {
>   ret void
> }
>
> But it can successfully build a stage2 with or without LTO, so it
> looks we are pretty good at dropping unused linkonce_odr and dropping
> it in codegen proper would not add any real value.
>
> Cheers,
> Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 30251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140811/14a28d03/attachment.bin>


More information about the llvm-commits mailing list