<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 6, 2015, at 9:21 AM, Reid Kleckner <<a href="mailto:rnk@google.com" class="">rnk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I think Chris originally envisioned appending linkage as a nice abstraction over all the hard parts of rigging up a custom object file section used across TUs with start and end symbols. However, that vision never came to pass, and anyway, it can be implemented entirely in Clang if we do want it. So, yeah, let's kill appending linkage.</div></div></blockquote><div><br class=""></div><div>Yep that’s right.  I’m fine in principle with killing appending linkage, so long as all the current clients have moved off of it.</div><div><br class=""></div><div>-Chris</div><br class=""><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Dec 6, 2015 at 8:36 AM, Rafael Espíndola <span dir="ltr" class=""><<a href="mailto:rafael.espindola@gmail.com" target="_blank" class="">rafael.espindola@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looking at how unique appending linkage handling is I started<br class="">
wondering if we still need it at all.<br class="">
<br class="">
Now that we have sections, private linkage and comdats, I don't think we do.<br class="">
<br class="">
Things like<br class="">
<br class="">
 @llvm.global_ctors = ... { i32 A1, i32 B1, i8* C1 }, { i32 A2, i32 B2, i8* C2 }<br class="">
<br class="">
can be represented as<br class="">
<br class="">
@ctor1 = private ... { i32 A1, i32 B1 }, section<br class="">
"llvm.metadata.ctors", comdat $(comdat of C1).<br class="">
@ctor2 = private ... { i32 A2, i32 B2 }, section<br class="">
"llvm.metadata.ctors", comdat $(comdat of C2).<br class="">
<br class="">
Which has a few advantages:<br class="">
<br class="">
* It links just like every other IR.<br class="">
* It representation matches what is actually done in the object file.<br class="">
Currently the representation has different meaning if C is not in a<br class="">
comdat.<br class="">
<br class="">
Cheers,<br class="">
Rafael<br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>