[PATCH] D13330: Implement __attribute__((unique_instantiation))

Mehdi AMINI via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 14 16:21:52 PST 2017


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.


Repository:
  rL LLVM

https://reviews.llvm.org/D13330





More information about the cfe-commits mailing list