[libcxx] r281264 - config: Use _LIBCPP_TYPE_VIS_ONLY with enum class

Shoaib Meenai via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 12 14:41:12 PDT 2016


Author: smeenai
Date: Mon Sep 12 16:41:12 2016
New Revision: 281264

URL: http://llvm.org/viewvc/llvm-project?rev=281264&view=rev
Log:
config: Use _LIBCPP_TYPE_VIS_ONLY with enum class

An enum class has associated type info. In the Microsoft ABI, type info
is emitted in the COMDAT section and isn't exported, so clang rightfully
complains about __declspec(dllexport) being unused for an enum class.
On other platforms, we still want to export the type info.

Differential Revision: https://reviews.llvm.org/D24065

Modified:
    libcxx/trunk/include/__config

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=281264&r1=281263&r2=281264&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Mon Sep 12 16:41:12 2016
@@ -716,7 +716,7 @@ template <unsigned> struct __static_asse
     _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \
     };
 #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)
 #endif  // _LIBCPP_HAS_NO_STRONG_ENUMS
 




More information about the cfe-commits mailing list