From fe73cb29ea88e01f48c11485204e55d688fec9f9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 23 Aug 2016 19:57:37 +0000 Subject: [PATCH] Update generated llvm DataTypes.h header. --- lib/clang/include/llvm/Support/DataTypes.h | 39 ++++++++++++---------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/lib/clang/include/llvm/Support/DataTypes.h b/lib/clang/include/llvm/Support/DataTypes.h index ceefdaf11aeb..5d02231fabff 100644 --- a/lib/clang/include/llvm/Support/DataTypes.h +++ b/lib/clang/include/llvm/Support/DataTypes.h @@ -22,8 +22,6 @@ /* Please leave this file C-compatible. */ -/* Please keep this file in sync with DataTypes.h.in */ - #ifndef SUPPORT_DATATYPES_H #define SUPPORT_DATATYPES_H @@ -38,36 +36,43 @@ #include #endif +#ifdef __cplusplus +#include +#else #ifdef HAVE_INTTYPES_H #include #endif +#endif +#ifdef __cplusplus +#include +#else #ifdef HAVE_STDINT_H #include #else #error "Compiler must provide an implementation of stdint.h" #endif +#endif #ifndef _MSC_VER -/* Note that this header's correct operation depends on __STDC_LIMIT_MACROS - being defined. We would define it here, but in order to prevent Bad Things - happening when system headers or C++ STL headers include stdint.h before we - define it here, we define it on the g++ command line (in Makefile.rules). */ -#if !defined(__STDC_LIMIT_MACROS) -# error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h" +#if !defined(UINT32_MAX) +# error "The standard header is not C++11 compliant. Must #define "\ + "__STDC_LIMIT_MACROS before #including Support/DataTypes.h" #endif -#if !defined(__STDC_CONSTANT_MACROS) -# error "Must #define __STDC_CONSTANT_MACROS before " \ - "#including Support/DataTypes.h" +#if !defined(UINT32_C) +# error "The standard header is not C++11 compliant. Must #define "\ + "__STDC_CONSTANT_MACROS before #including Support/DataTypes.h" #endif /* Note that includes , if this is a C99 system. */ #include #ifdef _AIX -#include "llvm/Support/AIXDataTypesFix.h" +// GCC is strict about defining large constants: they must have LL modifier. +#undef INT64_MAX +#undef INT64_MIN #endif /* Handle incorrect definition of uint64_t as u_int64_t */ @@ -80,14 +85,14 @@ typedef u_int64_t uint64_t; #endif #else /* _MSC_VER */ +#ifdef __cplusplus +#include +#include +#else #include #include -#include -#ifdef __cplusplus -#include -#else -#include #endif +#include #if defined(_WIN64) typedef signed __int64 ssize_t;