[patch] Cleanup handling of UniqueExternalLinkage.
John McCall
rjmccall at apple.com
Thu May 9 18:29:23 PDT 2013
On May 9, 2013, at 1:54 PM, Rafael EspĂndola <rafael.espindola at gmail.com> 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.
More information about the cfe-commits
mailing list