[patch] Fix linkage computation for derived types in inline functions

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu May 23 09:40:57 PDT 2013


> This seems to be a step towards what I think is the right end result. We
> have two separate notions: the formal language linkage, and whether an
> entity is externally visible. To that end:
>
> (external, visible) -> ExternalLinkage
> (external, not visible) -> UniqueExternalLinkage [*]
> (internal, visible) -> not possible
> (internal, not visible) -> InternalLinkage
> (no linkage, visible) -> VisibleNoLinkage
> (no linkage, not visible) -> NoLinkage
>
> ... and the combining step takes the minimum on each axis.

The two cases were this would produce different result from the last patch are:

InternalLinkage        VisibleNoLinkage       -> NoLinkage
UniqueExternalLinkage  VisibleNoLinkage       -> NoLinkage

My patch produces InternalLinkage and UniqueExternalLinkage.  Can you
think of a testcase where this would be a problem? hasLinkage returns
true, so it might be possible to produce wrong mangling somehow.

Cheers,
Rafael



More information about the cfe-commits mailing list