Commit c4ce9f74 by Derek Mauro Committed by Copybara-Service

Use the supported method for detecting RTTI in Clang:

ABSL_HAVE_FEATURE(cxx_rtti)

PiperOrigin-RevId: 555495363
Change-Id: I4f38bbffe1195ebdf26d7ed3bc92bc865dc8dd17
parent b9a414dd
......@@ -837,11 +837,16 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
// RTTI support.
#ifdef ABSL_INTERNAL_HAS_RTTI
#error ABSL_INTERNAL_HAS_RTTI cannot be directly set
#elif (defined(__GNUC__) && defined(__GXX_RTTI)) || \
(defined(_MSC_VER) && defined(_CPPRTTI)) || \
(!defined(__GNUC__) && !defined(_MSC_VER))
#elif ABSL_HAVE_FEATURE(cxx_rtti)
#define ABSL_INTERNAL_HAS_RTTI 1
#endif // !defined(__GNUC__) || defined(__GXX_RTTI)
#elif defined(__GNUC__) && defined(__GXX_RTTI)
#define ABSL_INTERNAL_HAS_RTTI 1
#elif defined(_MSC_VER) && defined(_CPPRTTI)
#define ABSL_INTERNAL_HAS_RTTI 1
#elif !defined(__GNUC__) && !defined(_MSC_VER)
// Unknown compiler, default to RTTI
#define ABSL_INTERNAL_HAS_RTTI 1
#endif
// ABSL_INTERNAL_HAVE_SSE is used for compile-time detection of SSE support.
// See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html for an overview of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment