aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/type_index.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/framework/type_index.h')
-rw-r--r--tensorflow/core/framework/type_index.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/framework/type_index.h b/tensorflow/core/framework/type_index.h
index dfde25c21e..b978d90fa8 100644
--- a/tensorflow/core/framework/type_index.h
+++ b/tensorflow/core/framework/type_index.h
@@ -17,7 +17,7 @@ limitations under the License.
#define TENSORFLOW_FRAMEWORK_TYPE_INDEX_H_
#include <string>
-#ifdef __GXX_RTTI
+#if defined(__GXX_RTTI) || defined(_CPPRTTI)
#include <typeindex>
#include <typeinfo>
#endif // __GXX_RTTI
@@ -30,7 +30,7 @@ namespace tensorflow {
// binary sizes. The following #ifdef section provides a non-RTTI
// replacement for std::type_index (with a minimal set of functions needed by
// the TensorFlow framework, and more can be added if necessary).
-#ifndef __GXX_RTTI
+#if !defined(__GXX_RTTI) && !defined(_CPPRTTI)
// A thin TypeIndex class that mimics std::type_index but does not use RTTI. As
// a result, it does not provide the actual name of the type, and only returns a