On Fri, May 10, 2013 at 7:07 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> getImplementationLinkage works for me. Presumably the intent is that this<br>
> would continue to be the linkage-used-for-code-emission once we fix the<br>
> various cases where getFormalLinkage does not return the<br>
> linkage-as-specified-in-the-standard, so just a comment about<br>
> UniqueExternalLinkage seems insufficient going forward.<br>
<br>
</div>No, the idea is to make UniqueExternalLinkage as much of an<br>
implementation detail as possible. The function<br>
getImplementationLinkage (or getRawLinkage) doesn't return the linkage<br>
as defined by the standard *or* the one used for codegen and parts of<br>
sema that want to reason about codegen. It returns a value that can be<br>
used to compute both, and is an implementation detail.<br>
<br>
getRawLinkage should only be called in places doing low level stuff<br>
(serialization for example) or in helper functions<br>
(hasExternalFormalLinkage, isExternallyVisible) which map our<br>
implementation to the linkage as defined by the standard or what we<br>
use in codegen.</blockquote><div><br></div><div>How about getLinkageInternal, then, with a comment saying what you wrote above?</div></div>