<div dir="ltr">On 5 October 2013 04:58, 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_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 5 October 2013 04:28, Nick Lewycky <<a href="mailto:nlewycky@google.com">nlewycky@google.com</a>> wrote:<br>
> On 4 October 2013 20:09, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>><br>
> wrote:<br>
>><br>
>> I noticed that gcc produces alias when compiling<br>
>><br>
>> void g();<br>
>> template<typename T><br>
>> struct foobar {<br>
>> foobar() {<br>
>> g();<br>
>> }<br>
>> };<br>
>> foobar<void> x;<br>
>><br>
>> To do the same in clang (patch to go in a sec) we have to allow<br>
>> linkonce_odr aliases in llvm. The attached patch does that.<br>
><br>
><br>
> Sorry -- I don't yet understand the motivation. What alias does it produce?<br>
> My gcc 4.8.1 doesn't produce an alias on this code on x86-64 linux at -O0.<br>
<br>
</div></div>Strange. The alias I see is<br>
<br>
.set _ZN6foobarIvEC1Ev,_ZN6foobarIvEC2Ev<br>
<br>
I have attached the entire gcc output.<br></blockquote><div><br></div><div>Thanks. Patch LGTM. I'd appreciate if you added documentation to the section "alias" in the LangRef to document which linkage types are permitted (I was surprised to see you didn't update it, but that's because there's nothing there about it at all).</div>
<div><br></div><div>Nick</div></div></div></div>