mirror of https://github.com/google/googletest.git
Remove obsolete HP aC++ workarounds in googletest
HP aC++ for HP-UX on Itanium (A.06.28) only supported up to C++03 and partial C++11 before HPE placed HP-UX and Itanium into maintenance mode. It was discontinued without ever supporting C++14 or C++17. As GoogleTest requires C++17, the HP-specific workarounds are obsolete and should be removed. PiperOrigin-RevId: 974700202 Change-Id: Iff9a41101f90f65d76394752bf197b8f2e97311f
This commit is contained in:
parent
4957858705
commit
defb708946
|
|
@ -134,12 +134,6 @@ macro(config_compiler_and_linker)
|
|||
# whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
|
||||
# explicitly.
|
||||
set(cxx_no_rtti_flags "-qnortti -DGTEST_HAS_RTTI=0")
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "HP")
|
||||
set(cxx_base_flags "-AA -mt")
|
||||
set(cxx_exception_flags "-DGTEST_HAS_EXCEPTIONS=1")
|
||||
set(cxx_no_exception_flags "+noeh -DGTEST_HAS_EXCEPTIONS=0")
|
||||
# RTTI can not be disabled in HP aCC compiler.
|
||||
set(cxx_no_rtti_flags "")
|
||||
endif()
|
||||
|
||||
# The pthreads library is available and allowed?
|
||||
|
|
|
|||
|
|
@ -481,10 +481,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
|||
#elif defined(__IBMCPP__) && defined(__EXCEPTIONS) && __EXCEPTIONS
|
||||
// xlC defines __EXCEPTIONS to 1 if and only if exceptions are enabled.
|
||||
#define GTEST_HAS_EXCEPTIONS 1
|
||||
#elif defined(__HP_aCC)
|
||||
// Exception handling is in effect by default in HP aCC compiler. It has to
|
||||
// be turned of by +noeh compiler option if desired.
|
||||
#define GTEST_HAS_EXCEPTIONS 1
|
||||
#else
|
||||
// For other compilers, we assume exceptions are disabled to be
|
||||
// conservative.
|
||||
|
|
@ -745,7 +741,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
|||
// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
|
||||
// Sun Pro CC, IBM Visual Age, and HP aCC support.
|
||||
#if defined(__GNUC__) || defined(_MSC_VER) || defined(__SUNPRO_CC) || \
|
||||
defined(__IBMCPP__) || defined(__HP_aCC)
|
||||
defined(__IBMCPP__)
|
||||
#define GTEST_HAS_TYPED_TEST 1
|
||||
#define GTEST_HAS_TYPED_TEST_P 1
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -47,8 +47,6 @@
|
|||
// libstdc++ (which is where cxxabi.h comes from).
|
||||
#if GTEST_HAS_CXXABI_H_
|
||||
#include <cxxabi.h>
|
||||
#elif defined(__HP_aCC)
|
||||
#include <acxx_demangle.h>
|
||||
#endif // GTEST_HASH_CXXABI_H_
|
||||
|
||||
namespace testing {
|
||||
|
|
@ -90,13 +88,11 @@ inline std::string CanonicalizeForStdLibVersioning(std::string s) {
|
|||
// GetTypeName(const std::type_info&) returns a human-readable name of type T.
|
||||
inline std::string GetTypeName(const std::type_info& type) {
|
||||
const char* const name = type.name();
|
||||
#if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)
|
||||
#if GTEST_HAS_CXXABI_H_
|
||||
int status = 0;
|
||||
// gcc's implementation of typeid(T).name() mangles the type name,
|
||||
// so we have to demangle it.
|
||||
#if GTEST_HAS_CXXABI_H_
|
||||
using abi::__cxa_demangle;
|
||||
#endif // GTEST_HAS_CXXABI_H_
|
||||
char* const readable_name = __cxa_demangle(name, nullptr, nullptr, &status);
|
||||
const std::string name_str(status == 0 ? readable_name : name);
|
||||
free(readable_name);
|
||||
|
|
@ -117,7 +113,7 @@ inline std::string GetTypeName(const std::type_info& type) {
|
|||
return s;
|
||||
#else
|
||||
return name;
|
||||
#endif // GTEST_HAS_CXXABI_H_ || __HP_aCC
|
||||
#endif // GTEST_HAS_CXXABI_H_
|
||||
}
|
||||
#endif // GTEST_HAS_RTTI
|
||||
|
||||
|
|
|
|||
|
|
@ -4010,8 +4010,8 @@ TEST(AssertionTest, NamedEnum) {
|
|||
EXPECT_NONFATAL_FAILURE(EXPECT_EQ(kE1, kE2), "Which is: 1");
|
||||
}
|
||||
|
||||
// Sun Studio and HP aCC2reject this code.
|
||||
#if !defined(__SUNPRO_CC) && !defined(__HP_aCC)
|
||||
// Sun Studio rejects this code.
|
||||
#if !defined(__SUNPRO_CC)
|
||||
|
||||
// Tests using assertions with anonymous enums.
|
||||
enum {
|
||||
|
|
@ -4072,7 +4072,7 @@ TEST(AssertionTest, AnonymousEnum) {
|
|||
EXPECT_FATAL_FAILURE(ASSERT_EQ(kCaseA, kCaseC), "\n Which is: -1");
|
||||
}
|
||||
|
||||
#endif // !GTEST_OS_MAC && !defined(__SUNPRO_CC)
|
||||
#endif // !defined(__SUNPRO_CC)
|
||||
|
||||
#ifdef GTEST_OS_WINDOWS
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue