[cfe-dev] [LLVMdev] weak_odr constant versus weak_odr global

Eric Christopher echristo at apple.com
Wed Dec 7 11:19:33 PST 2011


On Nov 27, 2011, at 5:00 AM, John McCall wrote:

> To sketch out the proposed IR extension a bit more:
> 1.  We add 'comdat "name"' to the global variable and function
> productions.  I have the COMDAT name in quotes only because
> there's no other precedent for a bare identifier in the IR grammar.
> I don't think we want to allow this on aliases;  I think I could
> probably invent reasonable semantics, but it's really not worth
> worrying about without cause.
> 2.  A symbol with a COMDAT name must be a definition.
> 3.  All symbols sharing the same COMDAT name are required to
> share the same linkage and visibility.  Conveniently, this lets us
> talk about the COMDAT's linkage / etc.
> 4.  A symbol with a COMDAT name is considered to be referenced
> if any symbol with the same COMDAT name is referenced
> (ignoring this rule).
> 5.  It's undefined behavior if two modules are linked and they
> export different sets of symbols with a given COMDAT name.
> 6.  Otherwise, if two modules are linked and they both export
> symbols with a given COMDAT name, all the symbols must be
> taken from the same module.
> 
> I think that covers it.

Mostly. How to work the current md node debug implementation into
this will be a bit tricky, but linking debug information is already a
task that needs to be looked at so…

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111207/8bd6a575/attachment.html>


More information about the cfe-dev mailing list