[PATCH] D31352: Linker: Mark non-prevailing dllexport symbols as exported with a linker flag.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 26 07:52:55 PDT 2017


Reid Kleckner <rnk at google.com> writes:

> On Fri, Mar 24, 2017 at 2:14 PM, Rafael Avila de Espindola <
> rafael.espindola at gmail.com> wrote:
>
>> This has the disadvantage that now two parts of the llvm are responsible
>> for converting dllexport to linker directives (even if they share the
>> function they call).
>>
>> I would prefer your previous solution or for the linker to keep a
>> dllexport declaration in the IR.
>>
>
> That proposal has the disadvantage that it breaks StripFunctionPrototypes
> and GlobalDCE. I thought we covered that in the discussion somewhere.

I would say it requires StripFunctionPrototypes and GlobalDCE to be
changed.

Even with this patch we have to change other passes.

For example, if the inliner inlines the last use of a linkonce_odr, it
has to keep the declaration if it is dllexport.

Cheers,
Rafael


More information about the llvm-commits mailing list