Remove obsolete IBM VisualAge / XL C++ workarounds in googletest

Classic IBM XL C/C++ (__IBMCPP__) only supported up to C++14 (V16.1 for AIX) before IBM retired the proprietary frontend and transitioned to IBM Open XL C/C++ (which is Clang-based and defines __clang__).

Since the legacy XL frontend never supported C++17, the workarounds are obsolete and should be removed.

PiperOrigin-RevId: 975123206
Change-Id: Ia706c7759d3f1df73d375fca68f91eee3aaef825
This commit is contained in:
Abseil Team
2026-09-02 07:37:31 -07:00
committed by Copybara-Service
parent 5f31f20eda
commit 8ecdd89c69
2 changed files with 1 additions and 24 deletions
-10
View File
@@ -119,16 +119,6 @@ macro(config_compiler_and_linker)
set(cxx_no_rtti_flags "-fno-rtti") set(cxx_no_rtti_flags "-fno-rtti")
set(cxx_strict_flags set(cxx_strict_flags
"-Wextra -Wno-unused-parameter -Wno-missing-field-initializers") "-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "VisualAge" OR
CMAKE_CXX_COMPILER_ID STREQUAL "XL")
# CMake 2.8 changes Visual Age's compiler ID to "XL".
set(cxx_exception_flags "-qeh")
set(cxx_no_exception_flags "-qnoeh")
# Until version 9.0, Visual Age doesn't define a macro to indicate
# whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
# explicitly.
set(cxx_no_rtti_flags "-qnortti -DGTEST_HAS_RTTI=0")
endif() endif()
# The pthreads library is available and allowed? # The pthreads library is available and allowed?
+1 -14
View File
@@ -465,9 +465,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#elif defined(__GNUC__) && defined(__EXCEPTIONS) && __EXCEPTIONS #elif defined(__GNUC__) && defined(__EXCEPTIONS) && __EXCEPTIONS
// gcc defines __EXCEPTIONS to 1 if and only if exceptions are enabled. // gcc defines __EXCEPTIONS to 1 if and only if exceptions are enabled.
#define GTEST_HAS_EXCEPTIONS 1 #define GTEST_HAS_EXCEPTIONS 1
#elif defined(__IBMCPP__) && defined(__EXCEPTIONS) && __EXCEPTIONS
// xlC defines __EXCEPTIONS to 1 if and only if exceptions are enabled.
#define GTEST_HAS_EXCEPTIONS 1
#else #else
// For other compilers, we assume exceptions are disabled to be // For other compilers, we assume exceptions are disabled to be
// conservative. // conservative.
@@ -596,16 +593,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#define GTEST_HAS_RTTI __has_feature(cxx_rtti) #define GTEST_HAS_RTTI __has_feature(cxx_rtti)
// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
// both the typeid and dynamic_cast features are present.
#elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
#ifdef __RTTI_ALL__
#define GTEST_HAS_RTTI 1
#else
#define GTEST_HAS_RTTI 0
#endif
#else #else
// For all other compilers, we assume RTTI is enabled. // For all other compilers, we assume RTTI is enabled.
@@ -727,7 +714,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0, // Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
// Sun Pro CC, IBM Visual Age, and HP aCC support. // Sun Pro CC, IBM Visual Age, and HP aCC support.
#if defined(__GNUC__) || defined(_MSC_VER) || defined(__IBMCPP__) #if defined(__GNUC__) || defined(_MSC_VER)
#define GTEST_HAS_TYPED_TEST 1 #define GTEST_HAS_TYPED_TEST 1
#define GTEST_HAS_TYPED_TEST_P 1 #define GTEST_HAS_TYPED_TEST_P 1
#endif #endif