summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-04 20:58:34 +0000
committerChris Lattner <sabre@nondot.org>2004-06-04 20:58:34 +0000
commitbc2de3c515fe5c6673a1402465ed45745b6f447f (patch)
treec9a2f7720ea13d381bba0a22bd28be53ec3e148f
parente7c776118c3ac4a301787b95237b9159e20fa88b (diff)
downloadllvm-bc2de3c515fe5c6673a1402465ed45745b6f447f.tar.gz
llvm-bc2de3c515fe5c6673a1402465ed45745b6f447f.tar.bz2
llvm-bc2de3c515fe5c6673a1402465ed45745b6f447f.tar.xz
Add some constants for VC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14028 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/Support/DataTypes.h.in14
-rw-r--r--include/llvm/Support/DataTypes.h.in14
2 files changed, 22 insertions, 6 deletions
diff --git a/include/Support/DataTypes.h.in b/include/Support/DataTypes.h.in
index 0690ee7e58..b1f14b26d5 100644
--- a/include/Support/DataTypes.h.in
+++ b/include/Support/DataTypes.h.in
@@ -11,9 +11,8 @@
// This file is important because different host OS's define different macros,
// which makes portability tough. This file exports the following definitions:
//
-// int64_t : is a typedef for the signed 64 bit system type
-// uint64_t : is a typedef for the unsigned 64 bit system type
-// INT64_MAX : is a #define specifying the max value for int64_t's
+// [u]int(32|64)_t : typedefs for signed and unsigned 32/64 bit system types
+// [U]INT(8|16|32|64)_(MIN|MAX) : Constants for the min and max values.
//
// No library is required when using these functinons.
//
@@ -42,6 +41,15 @@ typedef unsigned __int64 uint64_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef signed int ssize_t;
+#define INT8_MAX 127
+#define INT8_MIN -128
+#define UINT8_MAX 255
+#define INT16_MAX 32767
+#define INT16_MIN -32768
+#define UINT16_MAX 65535
+#define INT32_MAX 2147483647
+#define INT32_MIN -2147483648
+#define UINT32_MAX 4294967295U
#endif
#if !defined(INT64_MAX)
diff --git a/include/llvm/Support/DataTypes.h.in b/include/llvm/Support/DataTypes.h.in
index 0690ee7e58..b1f14b26d5 100644
--- a/include/llvm/Support/DataTypes.h.in
+++ b/include/llvm/Support/DataTypes.h.in
@@ -11,9 +11,8 @@
// This file is important because different host OS's define different macros,
// which makes portability tough. This file exports the following definitions:
//
-// int64_t : is a typedef for the signed 64 bit system type
-// uint64_t : is a typedef for the unsigned 64 bit system type
-// INT64_MAX : is a #define specifying the max value for int64_t's
+// [u]int(32|64)_t : typedefs for signed and unsigned 32/64 bit system types
+// [U]INT(8|16|32|64)_(MIN|MAX) : Constants for the min and max values.
//
// No library is required when using these functinons.
//
@@ -42,6 +41,15 @@ typedef unsigned __int64 uint64_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef signed int ssize_t;
+#define INT8_MAX 127
+#define INT8_MIN -128
+#define UINT8_MAX 255
+#define INT16_MAX 32767
+#define INT16_MIN -32768
+#define UINT16_MAX 65535
+#define INT32_MAX 2147483647
+#define INT32_MIN -2147483648
+#define UINT32_MAX 4294967295U
#endif
#if !defined(INT64_MAX)