diff --git a/include/llvm/Support/DataTypes.h.cmake b/include/llvm/Support/DataTypes.h.cmake
index d17f35f..e0eb3cf 100644
--- a/include/llvm/Support/DataTypes.h.cmake
+++ b/include/llvm/Support/DataTypes.h.cmake
@@ -102,6 +102,9 @@ typedef u_int64_t uint64_t;
 #else
 #include <math.h>
 #endif
+#if _MSC_VER >= 1600
+#include <stdint.h>
+#else
 typedef __int64 int64_t;
 typedef unsigned __int64 uint64_t;
 typedef signed int int32_t;
@@ -110,6 +113,7 @@ typedef short int16_t;
 typedef unsigned short uint16_t;
 typedef signed char int8_t;
 typedef unsigned char uint8_t;
+#endif
 typedef signed int ssize_t;
 #ifndef INT8_MAX
 # define INT8_MAX 127
diff --git a/include/llvm/Support/DataTypes.h.in b/include/llvm/Support/DataTypes.h.in
index b492bb1..4d93ef4 100644
--- a/include/llvm/Support/DataTypes.h.in
+++ b/include/llvm/Support/DataTypes.h.in
@@ -102,6 +102,9 @@ typedef u_int64_t uint64_t;
 #else
 #include <math.h>
 #endif
+#if _MSC_VER >= 1600
+#include <stdint.h>
+#else
 typedef __int64 int64_t;
 typedef unsigned __int64 uint64_t;
 typedef signed int int32_t;
@@ -110,6 +113,7 @@ typedef short int16_t;
 typedef unsigned short uint16_t;
 typedef signed char int8_t;
 typedef unsigned char uint8_t;
+#endif
 typedef signed int ssize_t;
 #ifndef INT8_MAX
 # define INT8_MAX 127
