r213289 - Provide __SIG_ATOMIC_MAX__ next to __SIG_ATOMIC_WIDTH__.

Joerg Sonnenberger joerg at bec.de
Thu Jul 17 11:31:20 PDT 2014


Author: joerg
Date: Thu Jul 17 13:31:20 2014
New Revision: 213289

URL: http://llvm.org/viewvc/llvm-project?rev=213289&view=rev
Log:
Provide __SIG_ATOMIC_MAX__ next to __SIG_ATOMIC_WIDTH__.

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=213289&r1=213288&r2=213289&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Thu Jul 17 13:31:20 2014
@@ -677,6 +677,7 @@ static void InitializePredefinedMacros(c
   DefineType("__WINT_TYPE__", TI.getWIntType(), Builder);
   DefineTypeWidth("__WINT_WIDTH__", TI.getWIntType(), TI, Builder);
   DefineTypeWidth("__SIG_ATOMIC_WIDTH__", TI.getSigAtomicType(), TI, Builder);
+  DefineTypeSize("__SIG_ATOMIC_MAX__", TI.getSigAtomicType(), TI, Builder);
   DefineType("__CHAR16_TYPE__", TI.getChar16Type(), Builder);
   DefineType("__CHAR32_TYPE__", TI.getChar32Type(), Builder);
 

Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=213289&r1=213288&r2=213289&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Thu Jul 17 13:31:20 2014
@@ -356,6 +356,7 @@
 // AARCH64:#define __PTRDIFF_WIDTH__ 64
 // AARCH64:#define __SCHAR_MAX__ 127
 // AARCH64:#define __SHRT_MAX__ 32767
+// AARCH64:#define __SIG_ATOMIC_MAX__ 2147483647
 // AARCH64:#define __SIG_ATOMIC_WIDTH__ 32
 // AARCH64:#define __SIZEOF_DOUBLE__ 8
 // AARCH64:#define __SIZEOF_FLOAT__ 4
@@ -543,6 +544,7 @@
 // AARCH64-BE:#define __PTRDIFF_WIDTH__ 64
 // AARCH64-BE:#define __SCHAR_MAX__ 127
 // AARCH64-BE:#define __SHRT_MAX__ 32767
+// AARCH64-BE:#define __SIG_ATOMIC_MAX__ 2147483647
 // AARCH64-BE:#define __SIG_ATOMIC_WIDTH__ 32
 // AARCH64-BE:#define __SIZEOF_DOUBLE__ 8
 // AARCH64-BE:#define __SIZEOF_FLOAT__ 4
@@ -732,6 +734,7 @@
 // AARCH64-NETBSD:#define __PTRDIFF_WIDTH__ 64
 // AARCH64-NETBSD:#define __SCHAR_MAX__ 127
 // AARCH64-NETBSD:#define __SHRT_MAX__ 32767
+// AARCH64-NETBSD:#define __SIG_ATOMIC_MAX__ 2147483647
 // AARCH64-NETBSD:#define __SIG_ATOMIC_WIDTH__ 32
 // AARCH64-NETBSD:#define __SIZEOF_DOUBLE__ 8
 // AARCH64-NETBSD:#define __SIZEOF_FLOAT__ 4
@@ -916,6 +919,7 @@
 // ARM:#define __REGISTER_PREFIX__
 // ARM:#define __SCHAR_MAX__ 127
 // ARM:#define __SHRT_MAX__ 32767
+// ARM:#define __SIG_ATOMIC_MAX__ 2147483647
 // ARM:#define __SIG_ATOMIC_WIDTH__ 32
 // ARM:#define __SIZEOF_DOUBLE__ 8
 // ARM:#define __SIZEOF_FLOAT__ 4
@@ -1102,6 +1106,7 @@
 // ARM-BE:#define __REGISTER_PREFIX__
 // ARM-BE:#define __SCHAR_MAX__ 127
 // ARM-BE:#define __SHRT_MAX__ 32767
+// ARM-BE:#define __SIG_ATOMIC_MAX__ 2147483647
 // ARM-BE:#define __SIG_ATOMIC_WIDTH__ 32
 // ARM-BE:#define __SIZEOF_DOUBLE__ 8
 // ARM-BE:#define __SIZEOF_FLOAT__ 4
@@ -1292,6 +1297,7 @@
 // ARMEABISOFTFP:#define __REGISTER_PREFIX__
 // ARMEABISOFTFP:#define __SCHAR_MAX__ 127
 // ARMEABISOFTFP:#define __SHRT_MAX__ 32767
+// ARMEABISOFTFP:#define __SIG_ATOMIC_MAX__ 2147483647
 // ARMEABISOFTFP:#define __SIG_ATOMIC_WIDTH__ 32
 // ARMEABISOFTFP:#define __SIZEOF_DOUBLE__ 8
 // ARMEABISOFTFP:#define __SIZEOF_FLOAT__ 4
@@ -1483,6 +1489,7 @@
 // ARMEABIHARDFP:#define __REGISTER_PREFIX__
 // ARMEABIHARDFP:#define __SCHAR_MAX__ 127
 // ARMEABIHARDFP:#define __SHRT_MAX__ 32767
+// ARMEABIHARDFP:#define __SIG_ATOMIC_MAX__ 2147483647
 // ARMEABIHARDFP:#define __SIG_ATOMIC_WIDTH__ 32
 // ARMEABIHARDFP:#define __SIZEOF_DOUBLE__ 8
 // ARMEABIHARDFP:#define __SIZEOF_FLOAT__ 4
@@ -1672,6 +1679,7 @@
 // ARM-NETBSD:#define __REGISTER_PREFIX__
 // ARM-NETBSD:#define __SCHAR_MAX__ 127
 // ARM-NETBSD:#define __SHRT_MAX__ 32767
+// ARM-NETBSD:#define __SIG_ATOMIC_MAX__ 2147483647
 // ARM-NETBSD:#define __SIG_ATOMIC_WIDTH__ 32
 // ARM-NETBSD:#define __SIZEOF_DOUBLE__ 8
 // ARM-NETBSD:#define __SIZEOF_FLOAT__ 4
@@ -1914,6 +1922,7 @@
 // I386:#define __REGISTER_PREFIX__ 
 // I386:#define __SCHAR_MAX__ 127
 // I386:#define __SHRT_MAX__ 32767
+// I386:#define __SIG_ATOMIC_MAX__ 2147483647
 // I386:#define __SIG_ATOMIC_WIDTH__ 32
 // I386:#define __SIZEOF_DOUBLE__ 8
 // I386:#define __SIZEOF_FLOAT__ 4
@@ -2096,6 +2105,7 @@
 // I386-LINUX:#define __REGISTER_PREFIX__ 
 // I386-LINUX:#define __SCHAR_MAX__ 127
 // I386-LINUX:#define __SHRT_MAX__ 32767
+// I386-LINUX:#define __SIG_ATOMIC_MAX__ 2147483647
 // I386-LINUX:#define __SIG_ATOMIC_WIDTH__ 32
 // I386-LINUX:#define __SIZEOF_DOUBLE__ 8
 // I386-LINUX:#define __SIZEOF_FLOAT__ 4
@@ -2278,6 +2288,7 @@
 // I386-NETBSD:#define __REGISTER_PREFIX__ 
 // I386-NETBSD:#define __SCHAR_MAX__ 127
 // I386-NETBSD:#define __SHRT_MAX__ 32767
+// I386-NETBSD:#define __SIG_ATOMIC_MAX__ 2147483647
 // I386-NETBSD:#define __SIG_ATOMIC_WIDTH__ 32
 // I386-NETBSD:#define __SIZEOF_DOUBLE__ 8
 // I386-NETBSD:#define __SIZEOF_FLOAT__ 4
@@ -2481,6 +2492,7 @@
 // MIPS32BE:#define __REGISTER_PREFIX__ 
 // MIPS32BE:#define __SCHAR_MAX__ 127
 // MIPS32BE:#define __SHRT_MAX__ 32767
+// MIPS32BE:#define __SIG_ATOMIC_MAX__ 2147483647
 // MIPS32BE:#define __SIG_ATOMIC_WIDTH__ 32
 // MIPS32BE:#define __SIZEOF_DOUBLE__ 8
 // MIPS32BE:#define __SIZEOF_FLOAT__ 4
@@ -2685,6 +2697,7 @@
 // MIPS32EL:#define __REGISTER_PREFIX__ 
 // MIPS32EL:#define __SCHAR_MAX__ 127
 // MIPS32EL:#define __SHRT_MAX__ 32767
+// MIPS32EL:#define __SIG_ATOMIC_MAX__ 2147483647
 // MIPS32EL:#define __SIG_ATOMIC_WIDTH__ 32
 // MIPS32EL:#define __SIZEOF_DOUBLE__ 8
 // MIPS32EL:#define __SIZEOF_FLOAT__ 4
@@ -2886,6 +2899,7 @@
 // MIPS64BE:#define __REGISTER_PREFIX__ 
 // MIPS64BE:#define __SCHAR_MAX__ 127
 // MIPS64BE:#define __SHRT_MAX__ 32767
+// MIPS64BE:#define __SIG_ATOMIC_MAX__ 2147483647
 // MIPS64BE:#define __SIG_ATOMIC_WIDTH__ 32
 // MIPS64BE:#define __SIZEOF_DOUBLE__ 8
 // MIPS64BE:#define __SIZEOF_FLOAT__ 4
@@ -3089,6 +3103,7 @@
 // MIPS64EL:#define __REGISTER_PREFIX__ 
 // MIPS64EL:#define __SCHAR_MAX__ 127
 // MIPS64EL:#define __SHRT_MAX__ 32767
+// MIPS64EL:#define __SIG_ATOMIC_MAX__ 2147483647
 // MIPS64EL:#define __SIG_ATOMIC_WIDTH__ 32
 // MIPS64EL:#define __SIZEOF_DOUBLE__ 8
 // MIPS64EL:#define __SIZEOF_FLOAT__ 4
@@ -3446,6 +3461,7 @@
 // MSP430:#define __PTRDIFF_WIDTH__ 16 
 // MSP430:#define __SCHAR_MAX__ 127
 // MSP430:#define __SHRT_MAX__ 32767
+// MSP430:#define __SIG_ATOMIC_MAX__ 2147483647
 // MSP430:#define __SIG_ATOMIC_WIDTH__ 32
 // MSP430:#define __SIZEOF_DOUBLE__ 8
 // MSP430:#define __SIZEOF_FLOAT__ 4
@@ -3629,6 +3645,7 @@
 // NVPTX32:#define __PTX__ 1
 // NVPTX32:#define __SCHAR_MAX__ 127
 // NVPTX32:#define __SHRT_MAX__ 32767
+// NVPTX32:#define __SIG_ATOMIC_MAX__ 2147483647
 // NVPTX32:#define __SIG_ATOMIC_WIDTH__ 32
 // NVPTX32:#define __SIZEOF_DOUBLE__ 8
 // NVPTX32:#define __SIZEOF_FLOAT__ 4
@@ -3811,6 +3828,7 @@
 // NVPTX64:#define __PTX__ 1
 // NVPTX64:#define __SCHAR_MAX__ 127
 // NVPTX64:#define __SHRT_MAX__ 32767
+// NVPTX64:#define __SIG_ATOMIC_MAX__ 2147483647
 // NVPTX64:#define __SIG_ATOMIC_WIDTH__ 32
 // NVPTX64:#define __SIZEOF_DOUBLE__ 8
 // NVPTX64:#define __SIZEOF_FLOAT__ 4
@@ -3998,6 +4016,7 @@
 // PPC603E:#define __REGISTER_PREFIX__
 // PPC603E:#define __SCHAR_MAX__ 127
 // PPC603E:#define __SHRT_MAX__ 32767
+// PPC603E:#define __SIG_ATOMIC_MAX__ 2147483647
 // PPC603E:#define __SIG_ATOMIC_WIDTH__ 32
 // PPC603E:#define __SIZEOF_DOUBLE__ 8
 // PPC603E:#define __SIZEOF_FLOAT__ 4
@@ -4193,6 +4212,7 @@
 // PPC64:#define __REGISTER_PREFIX__ 
 // PPC64:#define __SCHAR_MAX__ 127
 // PPC64:#define __SHRT_MAX__ 32767
+// PPC64:#define __SIG_ATOMIC_MAX__ 2147483647
 // PPC64:#define __SIG_ATOMIC_WIDTH__ 32
 // PPC64:#define __SIZEOF_DOUBLE__ 8
 // PPC64:#define __SIZEOF_FLOAT__ 4
@@ -4391,6 +4411,7 @@
 // PPC64LE:#define __REGISTER_PREFIX__ 
 // PPC64LE:#define __SCHAR_MAX__ 127
 // PPC64LE:#define __SHRT_MAX__ 32767
+// PPC64LE:#define __SIG_ATOMIC_MAX__ 2147483647
 // PPC64LE:#define __SIG_ATOMIC_WIDTH__ 32
 // PPC64LE:#define __SIZEOF_DOUBLE__ 8
 // PPC64LE:#define __SIZEOF_FLOAT__ 4
@@ -4768,6 +4789,7 @@
 // PPC64-LINUX:#define __REGISTER_PREFIX__
 // PPC64-LINUX:#define __SCHAR_MAX__ 127
 // PPC64-LINUX:#define __SHRT_MAX__ 32767
+// PPC64-LINUX:#define __SIG_ATOMIC_MAX__ 2147483647
 // PPC64-LINUX:#define __SIG_ATOMIC_WIDTH__ 32
 // PPC64-LINUX:#define __SIZEOF_DOUBLE__ 8
 // PPC64-LINUX:#define __SIZEOF_FLOAT__ 4
@@ -4958,6 +4980,7 @@
 // PPC:#define __REGISTER_PREFIX__ 
 // PPC:#define __SCHAR_MAX__ 127
 // PPC:#define __SHRT_MAX__ 32767
+// PPC:#define __SIG_ATOMIC_MAX__ 2147483647
 // PPC:#define __SIG_ATOMIC_WIDTH__ 32
 // PPC:#define __SIZEOF_DOUBLE__ 8
 // PPC:#define __SIZEOF_FLOAT__ 4
@@ -5144,6 +5167,7 @@
 // PPC-LINUX:#define __REGISTER_PREFIX__
 // PPC-LINUX:#define __SCHAR_MAX__ 127
 // PPC-LINUX:#define __SHRT_MAX__ 32767
+// PPC-LINUX:#define __SIG_ATOMIC_MAX__ 2147483647
 // PPC-LINUX:#define __SIG_ATOMIC_WIDTH__ 32
 // PPC-LINUX:#define __SIZEOF_DOUBLE__ 8
 // PPC-LINUX:#define __SIZEOF_FLOAT__ 4
@@ -5333,6 +5357,7 @@
 // PPC-DARWIN:#define __REGISTER_PREFIX__ 
 // PPC-DARWIN:#define __SCHAR_MAX__ 127
 // PPC-DARWIN:#define __SHRT_MAX__ 32767
+// PPC-DARWIN:#define __SIG_ATOMIC_MAX__ 2147483647
 // PPC-DARWIN:#define __SIG_ATOMIC_WIDTH__ 32
 // PPC-DARWIN:#define __SIZEOF_DOUBLE__ 8
 // PPC-DARWIN:#define __SIZEOF_FLOAT__ 4
@@ -5513,6 +5538,7 @@
 // S390X:#define __PTRDIFF_WIDTH__ 64
 // S390X:#define __SCHAR_MAX__ 127
 // S390X:#define __SHRT_MAX__ 32767
+// S390X:#define __SIG_ATOMIC_MAX__ 2147483647
 // S390X:#define __SIG_ATOMIC_WIDTH__ 32
 // S390X:#define __SIZEOF_DOUBLE__ 8
 // S390X:#define __SIZEOF_FLOAT__ 4
@@ -5692,6 +5718,7 @@
 // SPARC:#define __REGISTER_PREFIX__
 // SPARC:#define __SCHAR_MAX__ 127
 // SPARC:#define __SHRT_MAX__ 32767
+// SPARC:#define __SIG_ATOMIC_MAX__ 2147483647
 // SPARC:#define __SIG_ATOMIC_WIDTH__ 32
 // SPARC:#define __SIZEOF_DOUBLE__ 8
 // SPARC:#define __SIZEOF_FLOAT__ 4
@@ -5861,6 +5888,7 @@
 // TCE:#define __PTRDIFF_WIDTH__ 32
 // TCE:#define __SCHAR_MAX__ 127
 // TCE:#define __SHRT_MAX__ 32767
+// TCE:#define __SIG_ATOMIC_MAX__ 2147483647
 // TCE:#define __SIG_ATOMIC_WIDTH__ 32
 // TCE:#define __SIZEOF_DOUBLE__ 4
 // TCE:#define __SIZEOF_FLOAT__ 4
@@ -6041,6 +6069,7 @@
 // X86_64:#define __REGISTER_PREFIX__ 
 // X86_64:#define __SCHAR_MAX__ 127
 // X86_64:#define __SHRT_MAX__ 32767
+// X86_64:#define __SIG_ATOMIC_MAX__ 2147483647
 // X86_64:#define __SIG_ATOMIC_WIDTH__ 32
 // X86_64:#define __SIZEOF_DOUBLE__ 8
 // X86_64:#define __SIZEOF_FLOAT__ 4
@@ -6231,6 +6260,7 @@
 // X32:#define __REGISTER_PREFIX__ 
 // X32:#define __SCHAR_MAX__ 127
 // X32:#define __SHRT_MAX__ 32767
+// X32:#define __SIG_ATOMIC_MAX__ 2147483647
 // X32:#define __SIG_ATOMIC_WIDTH__ 32
 // X32:#define __SIZEOF_DOUBLE__ 8
 // X32:#define __SIZEOF_FLOAT__ 4
@@ -6419,6 +6449,7 @@
 // X86_64-LINUX:#define __REGISTER_PREFIX__ 
 // X86_64-LINUX:#define __SCHAR_MAX__ 127
 // X86_64-LINUX:#define __SHRT_MAX__ 32767
+// X86_64-LINUX:#define __SIG_ATOMIC_MAX__ 2147483647
 // X86_64-LINUX:#define __SIG_ATOMIC_WIDTH__ 32
 // X86_64-LINUX:#define __SIZEOF_DOUBLE__ 8
 // X86_64-LINUX:#define __SIZEOF_FLOAT__ 4
@@ -6613,6 +6644,7 @@
 // X86_64-NETBSD:#define __REGISTER_PREFIX__ 
 // X86_64-NETBSD:#define __SCHAR_MAX__ 127
 // X86_64-NETBSD:#define __SHRT_MAX__ 32767
+// X86_64-NETBSD:#define __SIG_ATOMIC_MAX__ 2147483647
 // X86_64-NETBSD:#define __SIG_ATOMIC_WIDTH__ 32
 // X86_64-NETBSD:#define __SIZEOF_DOUBLE__ 8
 // X86_64-NETBSD:#define __SIZEOF_FLOAT__ 4





More information about the cfe-commits mailing list