[libcxx-commits] [PATCH] D128007: [libc++] Simplify the visibility attributes

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 22 02:14:41 PDT 2022


philnik added inline comments.


================
Comment at: libcxx/include/__config:558
+#  if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+#    define _LIBCPP_VISIBILITY(vis) __attribute__((__visibility__(vis)))
+#  else
----------------
ldionne wrote:
> If we want to eventually refactor the Windows side of availability macros, I think we should have `_LIBCPP_VISIBILITY_HIDDEN` and `_LIBCPP_VISIBILITY_DEFAULT` instead of a macro parameter.
There isn't really any common ground between non-COFF and COFF in terms of visibility macros. In MinGW only `_LIBCPP_OVERRIDABLE_FUNC_VIS` and `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` are even defined non-empty, so I don't think it makes a lot of sense to try to unify non-COFF and COFF visibility macros.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128007



More information about the libcxx-commits mailing list