G M: Fix libcxx's detection of rtti disablement for g++.exe and cl.exe. When RTTI is NOT enabled, _LIBCPP_NO_RTTI is defined.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f7555069ab
commit
f677bc4165
@ -590,4 +590,16 @@ template <unsigned> struct __static_assert_check {};
|
|||||||
#define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
|
#define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Try to find out if RTTI is disabled.
|
||||||
|
// g++ and cl.exe have RTTI on by default and define a macro when it is.
|
||||||
|
// g++ only defines the macro in 4.3.2 and onwards.
|
||||||
|
#if !defined(_LIBCPP_NO_RTTI)
|
||||||
|
# if defined(__GNUG__) && (__GNUC__ >= 4 && \
|
||||||
|
(__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI)
|
||||||
|
# define _LIBCPP_NO_RTTI
|
||||||
|
# elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI)
|
||||||
|
# define _LIBCPP_NO_RTTI
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // _LIBCPP_CONFIG
|
#endif // _LIBCPP_CONFIG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user