summaryrefslogtreecommitdiff
path: root/lib/ubsan/ubsan_value.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ubsan/ubsan_value.h')
-rw-r--r--lib/ubsan/ubsan_value.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ubsan/ubsan_value.h b/lib/ubsan/ubsan_value.h
index 9426c6943..e92b2d6fc 100644
--- a/lib/ubsan/ubsan_value.h
+++ b/lib/ubsan/ubsan_value.h
@@ -23,15 +23,19 @@
#include "sanitizer_common/sanitizer_common.h"
// FIXME: Move this out to a config header.
+#if defined(__clang__) || _LP64
typedef __int128 s128;
typedef unsigned __int128 u128;
#define HAVE_INT128_T 1
+#else
+#define HAVE_INT128_T 0
+#endif
namespace __ubsan {
/// \brief Largest integer types we support.
-#ifdef HAVE_INT128_T
+#if HAVE_INT128_T
typedef s128 SIntMax;
typedef u128 UIntMax;
#else