[cfe-commits] r89348 - in /cfe/trunk: lib/Frontend/InitPreprocessor.cpp test/Preprocessor/init.c

Ken Dyck ken.dyck at onsemi.com
Thu Nov 19 06:16:57 PST 2009


Author: kjdyck
Date: Thu Nov 19 08:16:57 2009
New Revision: 89348

URL: http://llvm.org/viewvc/llvm-project?rev=89348&view=rev
Log:
Add __WINT_WIDTH__ to paramaterize the limits of WINT_MIN and WINT_MAX in 
stdint.h.


Modified:
    cfe/trunk/lib/Frontend/InitPreprocessor.cpp
    cfe/trunk/test/Preprocessor/init.c

Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=89348&r1=89347&r2=89348&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Thu Nov 19 08:16:57 2009
@@ -399,6 +399,7 @@
   DefineTypeWidth("__SIZE_WIDTH__", TI.getSizeType(), TI, Buf);
   DefineType("__WCHAR_TYPE__", TI.getWCharType(), Buf);
   DefineType("__WINT_TYPE__", TI.getWIntType(), Buf);
+  DefineTypeWidth("__WINT_WIDTH__", TI.getWIntType(), TI, Buf);
 
   DefineFloatMacros(Buf, "FLT", &TI.getFloatFormat());
   DefineFloatMacros(Buf, "DBL", &TI.getDoubleFormat());

Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=89348&r1=89347&r2=89348&view=diff

==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Thu Nov 19 08:16:57 2009
@@ -191,6 +191,7 @@
 // ARM:#define __WCHAR_MAX__ 2147483647
 // ARM:#define __WCHAR_TYPE__ int
 // ARM:#define __WINT_TYPE__ int
+// ARM:#define __WINT_WIDTH__ 32
 // ARM:#define __arm 1
 // ARM:#define __arm__ 1
 //
@@ -270,6 +271,7 @@
 // BFIN:#define __WCHAR_MAX__ 2147483647
 // BFIN:#define __WCHAR_TYPE__ int
 // BFIN:#define __WINT_TYPE__ int
+// BFIN:#define __WINT_WIDTH__ 32
 // BFIN:#define __bfin 1
 // BFIN:#define __bfin__ 1
 // BFIN:#define bfin 1
@@ -348,6 +350,7 @@
 // I386:#define __WCHAR_MAX__ 2147483647
 // I386:#define __WCHAR_TYPE__ int
 // I386:#define __WINT_TYPE__ int
+// I386:#define __WINT_WIDTH__ 32
 // I386:#define __i386 1
 // I386:#define __i386__ 1
 // I386:#define __nocona 1
@@ -427,6 +430,7 @@
 // MSP430:#define __WCHAR_MAX__ 32767
 // MSP430:#define __WCHAR_TYPE__ int
 // MSP430:#define __WINT_TYPE__ int
+// MSP430:#define __WINT_WIDTH__ 16
 // MSP430:#define __clang__ 1
 //
 // RUN: clang-cc -E -dM -ffreestanding -triple=pic16-none-none < /dev/null | FileCheck -check-prefix PIC16 %s
@@ -500,6 +504,7 @@
 // PIC16:#define __WCHAR_MAX__ 32767
 // PIC16:#define __WCHAR_TYPE__ int
 // PIC16:#define __WINT_TYPE__ int
+// PIC16:#define __WINT_WIDTH__ 16
 // PIC16:#define __clang__ 1
 // PIC16:#define __llvm__ 1
 // PIC16:#define __pic16 1
@@ -591,6 +596,7 @@
 // PPC64:#define __WCHAR_MAX__ 2147483647
 // PPC64:#define __WCHAR_TYPE__ int
 // PPC64:#define __WINT_TYPE__ int
+// PPC64:#define __WINT_WIDTH__ 32
 // PPC64:#define __ppc64__ 1
 // PPC64:#define __ppc__ 1
 //
@@ -673,6 +679,7 @@
 // PPC:#define __WCHAR_MAX__ 2147483647
 // PPC:#define __WCHAR_TYPE__ int
 // PPC:#define __WINT_TYPE__ int
+// PPC:#define __WINT_WIDTH__ 32
 // PPC:#define __ppc__ 1
 //
 // RUN: clang-cc -E -dM -ffreestanding -triple=s390x-none-none -fsigned-char=0 < /dev/null | FileCheck -check-prefix S390X %s
@@ -747,6 +754,7 @@
 // S390X:#define __WCHAR_MAX__ 2147483647
 // S390X:#define __WCHAR_TYPE__ int
 // S390X:#define __WINT_TYPE__ int
+// S390X:#define __WINT_WIDTH__ 32
 // S390X:#define __s390__ 1
 // S390X:#define __s390x__ 1
 //
@@ -823,6 +831,7 @@
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WINT_TYPE__ int
+// SPARC:#define __WINT_WIDTH__ 32
 // SPARC:#define __sparc 1
 // SPARC:#define __sparc__ 1
 // SPARC:#define __sparcv8 1
@@ -899,6 +908,7 @@
 // TCE:#define __WCHAR_MAX__ 2147483647
 // TCE:#define __WCHAR_TYPE__ int
 // TCE:#define __WINT_TYPE__ int
+// TCE:#define __WINT_WIDTH__ 32
 // TCE:#define __tce 1
 // TCE:#define __tce__ 1
 // TCE:#define tce 1
@@ -984,6 +994,7 @@
 // X86_64:#define __WCHAR_MAX__ 2147483647
 // X86_64:#define __WCHAR_TYPE__ int
 // X86_64:#define __WINT_TYPE__ int
+// X86_64:#define __WINT_WIDTH__ 32
 // X86_64:#define __amd64 1
 // X86_64:#define __amd64__ 1
 // X86_64:#define __nocona 1





More information about the cfe-commits mailing list