diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-10-13 02:30:10 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-10-13 02:30:10 +0000 |
commit | ba3fde65b900ce9d0ecdf034dfe3825eea810434 (patch) | |
tree | 6465664c7366356175ba01906d0a16f42742e593 /lib/ubsan/ubsan_value.h | |
parent | 58561700a4abad310911a24a867da49a14fae91e (diff) |
Fix the bootstrap of CompilerRT with host compilers that don't support
emulating 128-bit arithmetic on 32-bit x86 targets. This should get the
bootstrap back for GCC 4.6 at least.
Suggestions on better ways to do the detection here are welcome...
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan/ubsan_value.h')
-rw-r--r-- | lib/ubsan/ubsan_value.h | 6 |
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 |