[PATCH] CodeGen: Emit constant array temporaries into read-only globals.

David Majnemer david.majnemer at gmail.com
Tue Mar 3 11:35:25 PST 2015


On Tue, Mar 3, 2015 at 11:33 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> >> In this case the ComdatGV would be the function, which is not private,
> no?
> >
> >
> > I was referring to the case where the function has internal linkage (and
> we
> > have EmitUniquedSection enabled for data sections).  The global would be
> > private and it wouldn't be possible to  stick it in a COMDAT.
>
> I don't follow, if the function is internal, ComdatGV will be the
> function and have internal linkage, no?
>

The function will be internal but why would the ComdatGV be the function? I
don't see how the function would be in a COMDAT in that case.


>
> In any case, if there is a CodeGen limitation for COFF, using internal
> for COFF and private for MachO/ELF for now is probably fine.
>
> I will try to open a bug to track "private in comdat for COFF".
>

Thanks!


>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150303/8374f1f5/attachment.html>


More information about the cfe-commits mailing list