<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 27, 2011, at 5:00 AM, John McCall wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">To sketch out the proposed IR extension a bit more:<br>1.  We add 'comdat "name"' to the global variable and function<br>productions.  I have the COMDAT name in quotes only because<br>there's no other precedent for a bare identifier in the IR grammar.<br>I don't think we want to allow this on aliases;  I think I could<br>probably invent reasonable semantics, but it's really not worth<br>worrying about without cause.<br>2.  A symbol with a COMDAT name must be a definition.<br>3.  All symbols sharing the same COMDAT name are required to<br>share the same linkage and visibility.  Conveniently, this lets us<br>talk about the COMDAT's linkage / etc.<br>4.  A symbol with a COMDAT name is considered to be referenced<br>if any symbol with the same COMDAT name is referenced<br>(ignoring this rule).<br>5.  It's undefined behavior if two modules are linked and they<br>export different sets of symbols with a given COMDAT name.<br>6.  Otherwise, if two modules are linked and they both export<br>symbols with a given COMDAT name, all the symbols must be<br>taken from the same module.<br><br>I think that covers it.<br></span></blockquote></div><br><div>Mostly. How to work the current md node debug implementation into</div><div>this will be a bit tricky, but linking debug information is already a</div><div>task that needs to be looked at so…</div><div><br></div><div>-eric</div></body></html>