[PATCH] D145970: [MSVC][PS][dllexport/dllimport] Propagate a dllexport/dllimport attribute to template baseclasses

Wolfgang Pieb via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 14 08:31:53 PDT 2023


wolfgangp added a comment.

In D145970#4192679 <https://reviews.llvm.org/D145970#4192679>, @hans wrote:

> LGTM
>
> I've always found this to be an interesting behavior, and I'm guessing you found some code where it does matter :)

Well, one of our customers did, anyway. The code in the description is the distilled version of it.

Thank you for the review!



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:2612
+  if (Context.getTargetInfo().getCXXABI().isMicrosoft() ||
+      Context.getTargetInfo().getTriple().isPS()) {
     if (Attr *ClassAttr = getDLLAttr(Class)) {
----------------
hans wrote:
> Would using `getTargetInfo().shouldDLLImportComdatSymbols()` be appropriate here now?
Perhaps. It would affect the Windows/Itanium platform in addition to what's here, and I wasn't sure if that was desirable.


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

https://reviews.llvm.org/D145970



More information about the cfe-commits mailing list