[patch] Cleanup handling of UniqueExternalLinkage.

Richard Smith richard at metafoo.co.uk
Fri May 10 19:30:43 PDT 2013


On Fri, May 10, 2013 at 7:07 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> > getImplementationLinkage works for me. Presumably the intent is that this
> > would continue to be the linkage-used-for-code-emission once we fix the
> > various cases where getFormalLinkage does not return the
> > linkage-as-specified-in-the-standard, so just a comment about
> > UniqueExternalLinkage seems insufficient going forward.
>
> No, the idea is to make UniqueExternalLinkage as much of an
> implementation detail as possible. The function
> getImplementationLinkage (or getRawLinkage) doesn't return the linkage
> as defined by the standard *or* the one used for codegen and parts of
> sema that want to reason about codegen. It returns a value that can be
> used to compute both, and is an implementation detail.
>
> getRawLinkage should only be called in places doing low level stuff
> (serialization for example) or in helper functions
> (hasExternalFormalLinkage, isExternallyVisible) which map our
> implementation to the linkage as defined by the standard or what we
> use in codegen.


How about getLinkageInternal, then, with a comment saying what you wrote
above?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130510/7f45b856/attachment.html>


More information about the cfe-commits mailing list