[rfc] long term idea: remove appending linkage
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 6 16:09:13 PST 2015
On Sun, Dec 6, 2015 at 9:43 AM, David Majnemer <david.majnemer at gmail.com>
wrote:
>
>
> On Sunday, December 6, 2015, Rafael EspĂndola <llvm-commits at lists.llvm.org>
> wrote:
>
>> Looking at how unique appending linkage handling is I started
>> wondering if we still need it at all.
>>
>> Now that we have sections, private linkage and comdats, I don't think we
>> do.
>>
>> Things like
>>
>> @llvm.global_ctors = ... { i32 A1, i32 B1, i8* C1 }, { i32 A2, i32 B2,
>> i8* C2 }
>>
>> can be represented as
>>
>> @ctor1 = private ... { i32 A1, i32 B1 }, section
>> "llvm.metadata.ctors", comdat $(comdat of C1).
>> @ctor2 = private ... { i32 A2, i32 B2 }, section
>> "llvm.metadata.ctors", comdat $(comdat of C2).
>
>
> This wouldn't work on Mach-O because it doesn't have COMDATs.
>
That's OK, MachO uses guard variables to prevent double initialization
instead of comdats.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151206/b6ce6b1f/attachment.html>
More information about the llvm-commits
mailing list