diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-08-11 21:59:55 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-08-11 21:59:55 +0000 |
commit | 4c7324d032adec5dcd4a6d638e70cfae03742d7c (patch) | |
tree | 77599596d2423fc8c30a901cfb0607aad6fd2199 /include/llvm/Support | |
parent | 796d6b7602f0279b52ff5c105fb73fbdf444f030 (diff) | |
download | external_llvm-4c7324d032adec5dcd4a6d638e70cfae03742d7c.zip external_llvm-4c7324d032adec5dcd4a6d638e70cfae03742d7c.tar.gz external_llvm-4c7324d032adec5dcd4a6d638e70cfae03742d7c.tar.bz2 |
DataTypes.h.cmake: Tweak INT32_MIN for MSVC. MSC treats -2147483648 as -(2147483648U).
It caused an unexpected behavior since r137254.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/DataTypes.h.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/DataTypes.h.cmake b/include/llvm/Support/DataTypes.h.cmake index 72c4518..260ed9b 100644 --- a/include/llvm/Support/DataTypes.h.cmake +++ b/include/llvm/Support/DataTypes.h.cmake @@ -131,7 +131,8 @@ typedef signed int ssize_t; # define INT32_MAX 2147483647 #endif #ifndef INT32_MIN -# define INT32_MIN -2147483648 +/* MSC treats -2147483648 as -(2147483648U). */ +# define INT32_MIN (-INT32_MAX - 1) #endif #ifndef UINT32_MAX # define UINT32_MAX 4294967295U |