<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 7, 2016 at 6:44 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><div><div class="gmail_extra"><div class="gmail_quote">On 7 Sep 2016 6:23 pm, "Peter Collingbourne" <<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>> wrote:<br type="attribution"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">pcc marked 4 inline comments as done.<br>
<div><br>
================<br>
Comment at: lib/CodeGen/CGVTables.cpp:588<br>
@@ +587,3 @@<br>
+        if (auto *F = dyn_cast<llvm::Function>(Cache<wbr>))<br>
+          F->setUnnamedAddr(llvm::Global<wbr>Value::UnnamedAddr::Global);<br>
+        Cache = llvm::ConstantExpr::getBitCast<wbr>(Cache, CGM.Int8PtrTy);<br>
----------------<br>
</div><div>rsmith wrote:<br>
> Do you have any idea why we're doing this? It looks wrong to me. These ABI entry points are exposed and could certainly have their addresses taken and used in this translation unit.<br>
</div>I introduced this in D18071. Although a translation unit can take the address of one of these functions, that would involve declaring a function with a reserved name, so I believe we'd be allowed to impose restrictions such as `unnamed_addr` on the address.</blockquote></div></div></div><div><br></div></span><div>These are declared by <cxxabi.h>, and thus presumably intended to be useable by programs, so I'm not convinced that reasoning applies.</div></blockquote><div><br></div><div>cxxabi.h isn't part of the standard, is it? So whatever it does shouldn't have an effect on the standard.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Do we gain anything from this?</div></blockquote><div><br></div><div>Not at present (the relative ABI is the only user I know of and that isn't fully implemented yet on trunk), although something like this may be required if we ever fully implement the relative ABI.</div><div><br></div><div>Thanks,</div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div></div>