[PATCH] D146338: [MSVC compatibility][dllimport/dllexport][PS] Allow dllexport/dllimport for classes with UniqueExternalLinkage

Wolfgang Pieb via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 22 10:48:16 PDT 2023


wolfgangp updated this revision to Diff 507428.
wolfgangp added a comment.

Instead of suppressing the error message we drop the dllimport/dllexport attribute when we see that a class has UniqueExternal linkage. This will suppress exporting or importing any members, which could not be accessed outside the TU anyway.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146338/new/

https://reviews.llvm.org/D146338

Files:
  clang/lib/Sema/SemaDeclCXX.cpp
  clang/test/SemaCXX/dllexport.cpp
  clang/test/SemaCXX/dllimport.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146338.507428.patch
Type: text/x-patch
Size: 32975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230322/cc5672ea/attachment-0001.bin>


More information about the cfe-commits mailing list