[PATCH] D24065: [libc++] Don't attempt to dllexport enum class

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 21:54:21 PDT 2016


compnerd added inline comments.

================
Comment at: include/__config:719
@@ -718,3 +718,3 @@
 #else  // _LIBCPP_HAS_NO_STRONG_ENUMS
-#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_TYPE_VIS x
+#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_TYPE_VIS_ONLY x
 #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
----------------
smeenai wrote:
> compnerd wrote:
> > I don't think that this is right.  On non-Windows, this would potentially expand out to `__attribute__ (( __type_visibility__ ("default") ))`.  I don't believe that `enum classes` have anything like RTTI associated with them, so we don't really want type visibility for that.
> Good point. Should I just drop the visibility macro entirely then?
I think that might be the correct approach here.  The definition will be inlined in the header, so the values should always be available, so the visibility attributes shouldn't change anything anyways.


https://reviews.llvm.org/D24065





More information about the cfe-commits mailing list