On Tue, Feb 14, 2017 at 4:21 PM Mehdi AMINI via Phabricator via cfe-commits
<cfe-commits@lists.llvm.org> wrote:

> mehdi_amini added a comment.
>
> In https://reviews.llvm.org/D13330#582607, @rsmith wrote:
>
> > I think this attribute is poorly named. Explicit instantiation
> definitions are *already* required to be globally unique; see
> [temp.spec]/5.1:
> >
> > "For a given template and a given set of template-arguments, an explicit
> instantiation definition shall appear at most once in a program"
>
>
> So what prevents from emitting these as "strong" symbols without any
> attribute? We should have the guarantee that we have only one such copy in
> the program.
>

If I recall correctly - the requirement is that if there's an explicit
instantiation declaration there must be an explicit instantiation
definition, but it's not required that all sites required an instantiation
should see/have an explicit instantiation declaration. So you might have
some implicit instantiations scattered around, then one explicit
instantiation. If the explicit instantiation were strong, you'd get
duplicate symbol problems in your link.

(that's my naive/vague understanding anyway)


>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D13330
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to