<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Before my patch, code gen suppressed the emission of this function since it was available externally, and as a result, EmitVisibility, and thus MCSymbolELF::setVisibility, were simply never called. The undefined symbol then ended up with the default visibility. It seems to me that this essentially worked by luck. </div><div><br></div></div></div></div></blockquote><div><br></div><div>Yes, that is a bug in codegen. If the function should not be hidden clang should not be setting the visibility to hidden.</div><div><br></div><div>I will try to write a combined patch to change codegen and the new pass and see what is wrong in clang.</div><div><br></div><div>Cheers,</div><div>Rafael</div><div> </div></div></div></div>