diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 1b0b6dc5..1b2d2dec 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -333,7 +333,7 @@ #define GTEST_HAS_RTTI 1 #else #define GTEST_HAS_RTTI 0 -#endif // _CPPRTTI +#endif #elif defined(__GNUC__) @@ -349,6 +349,16 @@ #define GTEST_HAS_RTTI 1 #endif // GTEST_GCC_VER >= 40302 +#elif defined(__IBMCPP__) + +// IBM Visual Age defines __RTTI_ALL__ to 1 if both the typeid and +// dynamic_cast features are present. +#ifdef __RTTI_ALL__ +#define GTEST_HAS_RTTI 1 +#else +#define GTEST_HAS_RTTI 0 +#endif + #else // Unknown compiler - assume RTTI is enabled.