On May 9, 2013, at 1:54 PM, Rafael Espíndola <[email protected]> wrote:
> Before trying to implement the C++11 rules for anonymous namespaces
> (or fix pr15930) I would like to cleanup how we handle
> UniqueExternalLinkage.
> 
> The attached patch is a nop. It just replaces most uses of getLinkage
> with getSemaLinkage and getCodeGenLinkage. Some of these calls should
> be audited to make sure they are calling the right function, but that
> is probably better done in an independent patch, so this one is
> mechanical:
> 
> hasExternalLinkage -> hasExternalCodeGenLinkage

I dislike the "CodeGen" / "Sema" split here.  The semantic property that
IR-generation cares about is whether the declaration is permitted to be
the same declaration under the ODR as a hypothetical declaration in
another translation unit.  That's what Sema usually cares about, too;
I would guess that only some narrow formalistic cases really want to
think of e.g. vector<MyInternalType> as having external linkage.

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to