[PATCH] D31270: [wip] IR: Move linker options to top-level global metadata and remove dllexport storage class.

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 09:32:07 PDT 2017


rjmccall added a comment.

This is a very disruptive change — it completely changes the IR model for dllexport, thus breaking every single frontend that targets Windows.  LLVM should care about the impact on out-of-tree frontends.  And I'm not worried about Swift here, because we've got a very motivated community; I'm worried about the dozens of other random language frontends that maintain a Windows port.

Furthermore, by your account, this isn't even the representation we want to end up with.  In the long term, we should completely fold dllimport and dllexport into symbol visibility.  So you're talking about breaking every Windows frontend twice, for some corner case that doesn't really matter to the vast majority of frontends.

I'm willing to accept your argument that attaching extra meaning to declarations is also disruptive.  Fine.  The obvious compromise position that doesn't involve completely changing how every Windows frontend works is to take your global metadata idea and have it be an opt-in feature usable on an arbitrary symbol name.  But right now, you are proposing a breaking change to IR that will make extra work for a ton of frontend authors, purely for the implementation convenience of the LTO linker.  That is not an appropriate trade-off.


https://reviews.llvm.org/D31270





More information about the llvm-commits mailing list