[PATCH] D133267: [Verifier] Reject dllexport with non-default visibility
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 15:30:16 PDT 2022
MaskRay added a comment.
In D133267#3771894 <https://reviews.llvm.org/D133267#3771894>, @bd1976llvm wrote:
> Hi! Sorry for not raising this issue prior to commit. The dllimport restriction seems correct to us. However, in PlayStation we are using dllexportclass=dllexport visibility=protected GlobalValues in LLVM IR. The protected visibility indicates that the symbol cannot be preempted and could be exported and dllexport indicates that it should be exported. This allows for implementing export control from C/C++ source code. This change has made this usage illegal. It doesn't makes sense semantically to restrict dllexport to visibility=default in LLVM IR, the restriction should be to visibility != hidden as hidden symbols cannot be exported by ELF linkers. Thanks.
Oh, didn't know. Pushed 97d00b72a2b0a7aca631e1402a647f32c4e8bafb <https://reviews.llvm.org/rG97d00b72a2b0a7aca631e1402a647f32c4e8bafb> to allow `dllexport protected`.
Does PlayStation need to relax the clang check D133266 <https://reviews.llvm.org/D133266>, too? (I have noticed that this combo makes sense but rejected it for simplicity.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133267/new/
https://reviews.llvm.org/D133267
More information about the llvm-commits
mailing list