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

Ken Dyck ken.dyck at onsemi.com
Wed Nov 18 12:05:48 PST 2009


Author: kjdyck
Date: Wed Nov 18 14:05:48 2009
New Revision: 89231

URL: http://llvm.org/viewvc/llvm-project?rev=89231&view=rev
Log:
Predefine __INTPTR_WIDTH__ for future use 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=89231&r1=89230&r2=89231&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Wed Nov 18 14:05:48 2009
@@ -391,6 +391,7 @@
   DefineTypeWidth("__INTMAX_WIDTH__",  TI.getIntMaxType(), TI, Buf);
   DefineType("__PTRDIFF_TYPE__", TI.getPtrDiffType(0), Buf);
   DefineType("__INTPTR_TYPE__", TI.getIntPtrType(), Buf);
+  DefineTypeWidth("__INTPTR_WIDTH__", TI.getIntPtrType(), TI, Buf);
   DefineType("__SIZE_TYPE__", TI.getSizeType(), Buf);
   DefineType("__WCHAR_TYPE__", TI.getWCharType(), Buf);
   DefineType("__WINT_TYPE__", TI.getWIntType(), Buf);

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

==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Wed Nov 18 14:05:48 2009
@@ -157,6 +157,7 @@
 // ARM:#define __INTMAX_MAX__ 9223372036854775807LL
 // ARM:#define __INTMAX_WIDTH__ 64
 // ARM:#define __INTPTR_TYPE__ long int
+// ARM:#define __INTPTR_WIDTH__ 32
 // ARM:#define __INT_MAX__ 2147483647
 // ARM:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
 // ARM:#define __LDBL_DIG__ 15
@@ -234,6 +235,7 @@
 // BFIN:#define __INTMAX_MAX__ 9223372036854775807LL
 // BFIN:#define __INTMAX_WIDTH__ 64
 // BFIN:#define __INTPTR_TYPE__ long int
+// BFIN:#define __INTPTR_WIDTH__ 32
 // BFIN:#define __INT_MAX__ 2147483647
 // BFIN:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
 // BFIN:#define __LDBL_DIG__ 15
@@ -304,6 +306,7 @@
 // I386:#define __INTMAX_MAX__ 9223372036854775807LL
 // I386:#define __INTMAX_WIDTH__ 64
 // I386:#define __INTPTR_TYPE__ int
+// I386:#define __INTPTR_WIDTH__ 32
 // I386:#define __INT_MAX__ 2147483647
 // I386:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
 // I386:#define __LDBL_DIG__ 18
@@ -380,6 +383,7 @@
 // MSP430:#define __INTMAX_MAX__ 2147483647L
 // MSP430:#define __INTMAX_WIDTH__ 32
 // MSP430:#define __INTPTR_TYPE__ short
+// MSP430:#define __INTPTR_WIDTH__ 16
 // MSP430:#define __INT_MAX__ 32767
 // MSP430:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
 // MSP430:#define __LDBL_DIG__ 15
@@ -449,6 +453,7 @@
 // PIC16:#define __INTMAX_MAX__ 2147483647L
 // PIC16:#define __INTMAX_WIDTH__ 32
 // PIC16:#define __INTPTR_TYPE__ short
+// PIC16:#define __INTPTR_WIDTH__ 16
 // PIC16:#define __INT_MAX__ 32767
 // PIC16:#define __LDBL_DENORM_MIN__ 1.40129846e-45F
 // PIC16:#define __LDBL_DIG__ 6
@@ -530,6 +535,7 @@
 // PPC64:#define __INTMAX_MAX__ 9223372036854775807L
 // PPC64:#define __INTMAX_WIDTH__ 64
 // PPC64:#define __INTPTR_TYPE__ long int
+// PPC64:#define __INTPTR_WIDTH__ 64
 // PPC64:#define __INT_MAX__ 2147483647
 // PPC64:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
 // PPC64:#define __LDBL_DIG__ 15
@@ -608,6 +614,7 @@
 // PPC:#define __INTMAX_MAX__ 9223372036854775807LL
 // PPC:#define __INTMAX_WIDTH__ 64
 // PPC:#define __INTPTR_TYPE__ long int
+// PPC:#define __INTPTR_WIDTH__ 32
 // PPC:#define __INT_MAX__ 2147483647
 // PPC:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
 // PPC:#define __LDBL_DIG__ 15
@@ -681,6 +688,7 @@
 // S390X:#define __INTMAX_MAX__ 9223372036854775807LL
 // S390X:#define __INTMAX_WIDTH__ 64
 // S390X:#define __INTPTR_TYPE__ long int
+// S390X:#define __INTPTR_WIDTH__ 64
 // S390X:#define __INT_MAX__ 2147483647
 // S390X:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
 // S390X:#define __LDBL_DIG__ 15
@@ -750,6 +758,7 @@
 // SPARC:#define __INTMAX_MAX__ 9223372036854775807LL
 // SPARC:#define __INTMAX_WIDTH__ 64
 // SPARC:#define __INTPTR_TYPE__ long int
+// SPARC:#define __INTPTR_WIDTH__ 32
 // SPARC:#define __INT_MAX__ 2147483647
 // SPARC:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
 // SPARC:#define __LDBL_DIG__ 15
@@ -821,6 +830,7 @@
 // TCE:#define __INTMAX_MAX__ 2147483647L
 // TCE:#define __INTMAX_WIDTH__ 32
 // TCE:#define __INTPTR_TYPE__ int
+// TCE:#define __INTPTR_WIDTH__ 32
 // TCE:#define __INT_MAX__ 2147483647
 // TCE:#define __LDBL_DENORM_MIN__ 1.40129846e-45F
 // TCE:#define __LDBL_DIG__ 6
@@ -894,6 +904,7 @@
 // X86_64:#define __INTMAX_MAX__ 9223372036854775807L
 // X86_64:#define __INTMAX_WIDTH__ 64
 // X86_64:#define __INTPTR_TYPE__ long int
+// X86_64:#define __INTPTR_WIDTH__ 64
 // X86_64:#define __INT_MAX__ 2147483647
 // X86_64:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
 // X86_64:#define __LDBL_DIG__ 18





More information about the cfe-commits mailing list