From 7afc8fa44c3036e0d99334d3a07f4d9720dce978 Mon Sep 17 00:00:00 2001 From: Shoaib Meenai Date: Mon, 12 Sep 2016 21:41:12 +0000 Subject: [PATCH] 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 llvm-svn: 281264 --- libcxx/include/__config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/include/__config b/libcxx/include/__config index 5866075..fb3efa0 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -716,7 +716,7 @@ template struct __static_assert_check {}; _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 -- 2.7.4