[PATCH] D18674: [ThinLTO/gold] Change preempted def to avail extern linkage when possible

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 13:52:34 PDT 2016


On Tue, Apr 5, 2016 at 1:49 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

> On 5 April 2016 at 16:46, Teresa Johnson <tejohnson at google.com> wrote:
> > tejohnson added inline comments.
> >
> > ================
> > Comment at: tools/gold/gold-plugin.cpp:779
> > @@ +778,3 @@
> > +      // FIXME: For can preempted Comdat members be dropped from their
> > +      // Comdat so they can use available_externally linkage?
> > +      if (options::thinlto && !GV->hasComdat() &&
> > ----------------
> > rafael wrote:
> >> It is OK to have available_externally to a comdat member, no?
> >>
> >> I mean, it is equivalent to a declaration, and we can have a
> declaration to a comdat member.
> > You can't have a declaration or available_externally in a comdat. From
> Verifier.cpp:
> >
> >   if (GV.isDeclarationForLinker())
> >     Assert(!GV.hasComdat(), "Declaration may not be in a Comdat!", &GV);
>
> Yes, what I mean is that is valid to have a declaration that points to
> something in a  comdat. That is what you get in c++ with an explicit
> template instantiation declaration.
>

Oh sure, that's what I'm referring to in the FIXME. I could do that in this
patch pretty easily I suppose, let me do that.

Thanks,
Teresa


>
> Cheers,
> Rafael
>



-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |  408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160405/ab24cbbe/attachment.html>


More information about the llvm-commits mailing list