<br><br>On Wednesday, December 17, 2014, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br><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">On Wed, Dec 17, 2014 at 3:52 PM, Rafael Espíndola <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','rafael.espindola@gmail.com');" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>> Based on talking to David, we think the frontend should be responsible for<br>
> picking whether things are ODR or not, and then LLVM optimizations can<br>
> continue to be mostly ignorant of comdats. For example, the D5 destructor<br>
> comdat group functions should all be inlinable.<br>
<br>
</span>+1 :-)<br></blockquote><div><br></div><div>I think that makes a lot of sense. Does this imply that globals within a comdat would need to have some kind of weak linkage?</div></div></div></div></blockquote><div><br></div>The only non-weak linkage we allow in COMDATs is external.  The closest analog is weak_odr but it has subtly different semantics wrt duplicate symbol definitions.<br><div><br></div><div>I'll try to dig up a concrete example as soon as I can get to my laptop.</div>