[PATCH] Change representation of dllexport/dllimport

Nick Lewycky nlewycky at google.com
Wed Sep 11 11:03:14 PDT 2013


On 11 September 2013 09:24, Reid Kleckner <rnk at google.com> wrote:

> On Wed, Sep 11, 2013 at 11:38 AM, Nico Rieck <nico.rieck at gmail.com> wrote:
>
>> On 09.09.2013 18:36, Reid Kleckner wrote:
>>
>>> How's this patch doing?  It's come up on the mailing lists a few times,
>>> so I thought I'd ping. :)
>>>
>>
>> I guess it's mainly lacking more feedback about which variant to pursue.
>> As reasoned before, I don't really like conflating the term "visibility"
>> with dllimport (it would also require making -fvisibility=hidden the
>> default). But opinions on this have been very scarce.
>>
>
> As for opinions, everyone I talked to locally felt that if the export
> controls can't be combined with visibility, then there's no reason to make
> the invalid combinations representable in IR.  Maybe they'll chime in.
>

I'm one of those. The "visibility" in IR is currently ELF visibility, but I
don't see any reason it can't be "ELF and PE/COFF visibility". This is the
approach that makes the most sense to me, with my limited understanding
that dllimport/dllexport serve the same purpose as ELF's visibilities do.

I don't see a need to make -fvisibility=hidden the default, either.
>

Yeah, I completely didn't understand this part either. If a symbol
visibility is set to hidden, it isn't set to dllimport nor dllexport, nor
are you generating PE/COFF because that file format doesn't support ELF
hidden. Huh?

Nick


>  I don't want to use the same enum for default visibility and dllexport.
>  It seems to me that default visibility should be the platform default
> visibility when linking DSOs, and dllexport should force a symbol into
> .drectve and possibly into .dynsym for ELF, if that's representable in a .o
> file.
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130911/941805ba/attachment.html>


More information about the llvm-commits mailing list