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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@281264 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Shoaib Meenai
2016-09-12 21:41:12 +00:00
parent b6b8e1ef3a
commit 8b8913084d

View File

@@ -716,7 +716,7 @@ template <unsigned> 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