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

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 20 07:32:33 PDT 2023


hans added a comment.

> In D145271 <https://reviews.llvm.org/D145271> it was suggested that we drop the attribute in such contexts, and this is effectively what happens. The compiler does not produce any exported definitions (or import any symbols) for such classes. The patch is simply to suppress the diagnostic for MSVC mode and Playstation.

With the current patch, we still end up with the attribute on the base class in the AST. Also, does this make the compiler accept dllexport of classes in anonymous namespaces? I'm not sure we want that.

Is it not possible to check the linkage and bail out in `Sema::propagateDLLAttrToBaseClassTemplate` instead?


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

https://reviews.llvm.org/D146338



More information about the cfe-commits mailing list