summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor')
-rw-r--r--test/Preprocessor/assembler-with-cpp.c34
-rw-r--r--test/Preprocessor/c99-6_10_3_3_p4.c6
-rw-r--r--test/Preprocessor/c99-6_10_3_4_p5.c11
-rw-r--r--test/Preprocessor/c99-6_10_3_4_p6.c13
-rw-r--r--test/Preprocessor/c99-6_10_3_4_p7.c5
-rw-r--r--test/Preprocessor/c99-6_10_3_4_p9.c20
-rw-r--r--test/Preprocessor/comment_save.c7
-rw-r--r--test/Preprocessor/comment_save_macro.c11
-rw-r--r--test/Preprocessor/has_include.c83
-rw-r--r--test/Preprocessor/init.c945
-rw-r--r--test/Preprocessor/line-directive.c2
-rw-r--r--test/Preprocessor/macro_disable3.c4
-rw-r--r--test/Preprocessor/macro_paste_mscomment.c10
-rw-r--r--test/Preprocessor/macro_rescan_varargs.c7
-rw-r--r--test/Preprocessor/macro_rparen_scan2.c4
-rw-r--r--test/Preprocessor/macro_undef.c4
-rw-r--r--test/Preprocessor/output_paste_avoid.c17
-rw-r--r--test/Preprocessor/stdint.c1244
-rw-r--r--test/Preprocessor/stringize_misc.c16
19 files changed, 2377 insertions, 66 deletions
diff --git a/test/Preprocessor/assembler-with-cpp.c b/test/Preprocessor/assembler-with-cpp.c
index f7706ca..4f1c443 100644
--- a/test/Preprocessor/assembler-with-cpp.c
+++ b/test/Preprocessor/assembler-with-cpp.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -x assembler-with-cpp -fdollars-in-identifiers=0 -E %s > %t &&
+// RUN: clang-cc -x assembler-with-cpp -fdollars-in-identifiers=0 -E %s -o - | FileCheck -strict-whitespace -check-prefix=CHECK-Identifiers-False %s &&
#ifndef __ASSEMBLER__
#error "__ASSEMBLER__ not defined"
@@ -6,72 +6,70 @@
// Invalid token pasting is ok.
-// RUN: grep '1: X .' %t &&
#define A X ## .
1: A
+// CHECK-Identifiers-False: 1: X .
// Line markers are not linemarkers in .S files, they are passed through.
-// RUN: grep '# 321' %t &&
# 321
+// CHECK-Identifiers-False: # 321
// Unknown directives are passed through.
-// RUN: grep '# B C' %t &&
# B C
+// CHECK-Identifiers-False: # B C
// Unknown directives are expanded.
-// RUN: grep '# BAR42' %t &&
#define D(x) BAR ## x
# D(42)
+// CHECK-Identifiers-False: # BAR42
// Unmatched quotes are permitted.
-// RUN: grep "2: '" %t &&
-// RUN: grep '3: "' %t &&
2: '
3: "
+// CHECK-Identifiers-False: 2: '
+// CHECK-Identifiers-False: 3: "
// (balance quotes to keep editors happy): "'
// Empty char literals are ok.
-// RUN: grep "4: ''" %t &&
4: ''
+// CHECK-Identifiers-False: 4: ''
// Portions of invalid pasting should still expand as macros.
// rdar://6709206
-// RUN: grep "5: expanded (" %t &&
#define M4 expanded
#define M5() M4 ## (
5: M5()
+// CHECK-Identifiers-False: 5: expanded (
// rdar://6804322
-// RUN: grep -F "6: blarg $foo" %t &&
#define FOO(name) name ## $foo
6: FOO(blarg)
+// CHECK-Identifiers-False: 6: blarg $foo
-// RUN: clang-cc -x assembler-with-cpp -fdollars-in-identifiers=1 -E %s > %t &&
-// RUN: grep -F "7: blarg$foo" %t &&
+// RUN: clang-cc -x assembler-with-cpp -fdollars-in-identifiers=1 -E %s -o - | FileCheck -check-prefix=CHECK-Identifiers-True -strict-whitespace %s &&
#define FOO(name) name ## $foo
7: FOO(blarg)
-
+// CHECK-Identifiers-True: 7: blarg$foo
//
#define T6() T6 #nostring
#define T7(x) T7 #x
8: T6()
9: T7(foo)
-// RUN: grep '8: T6 #nostring' %t &&
-// RUN: grep '9: T7 "foo"' %t &&
+// CHECK-Identifiers-True: 8: T6 #nostring
+// CHECK-Identifiers-True: 9: T7 "foo"
// Concatenation with period doesn't leave a space
-// RUN: grep -F '10: .T8' %t &&
#define T8(A,B) A ## B
10: T8(.,T8)
-
+// CHECK-Identifiers-True: 10: .T8
// This should not crash.
-// RUN: grep '11: #0' %t &&
#define T11(a) #0
11: T11(b)
+// CHECK-Identifiers-True: 11: #0
// RUN: true
diff --git a/test/Preprocessor/c99-6_10_3_3_p4.c b/test/Preprocessor/c99-6_10_3_3_p4.c
index 8966054..99ad6e8 100644
--- a/test/Preprocessor/c99-6_10_3_3_p4.c
+++ b/test/Preprocessor/c99-6_10_3_3_p4.c
@@ -1,6 +1,10 @@
-// RUN: clang-cc -E %s | grep -F 'char p[] = "x ## y";'
+// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s
+
#define hash_hash # ## #
#define mkstr(a) # a
#define in_between(a) mkstr(a)
#define join(c, d) in_between(c hash_hash d)
char p[] = join(x, y);
+
+// CHECK: char p[] = "x ## y";
+
diff --git a/test/Preprocessor/c99-6_10_3_4_p5.c b/test/Preprocessor/c99-6_10_3_4_p5.c
index 22bdf82..08b2c42 100644
--- a/test/Preprocessor/c99-6_10_3_4_p5.c
+++ b/test/Preprocessor/c99-6_10_3_4_p5.c
@@ -1,10 +1,5 @@
// Example from C99 6.10.3.4p5
-
-// RUN: clang-cc -E %s | grep -F 'f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);' &&
-// RUN: clang-cc -E %s | grep -F 'f(2 * (2 +(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);' &&
-// RUN: clang-cc -E %s | grep -F 'int i[] = { 1, 23, 4, 5, };' &&
-// RUN: clang-cc -E %s | grep -F 'char c[2][6] = { "hello", "" };'
-
+// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s
#define x 3
#define f(a) f(x * (a))
@@ -26,4 +21,8 @@
p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,) };
char c[2][6] = { str(hello), str() };
+// CHECK: f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
+// CHECK: f(2 * (2 +(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
+// CHECK: int i[] = { 1, 23, 4, 5, };
+// CHECK: char c[2][6] = { "hello", "" };
diff --git a/test/Preprocessor/c99-6_10_3_4_p6.c b/test/Preprocessor/c99-6_10_3_4_p6.c
index c48d2ef..8072d7b 100644
--- a/test/Preprocessor/c99-6_10_3_4_p6.c
+++ b/test/Preprocessor/c99-6_10_3_4_p6.c
@@ -1,10 +1,6 @@
// Example from C99 6.10.3.4p6
-// RUN: clang-cc -E %s | grep -F 'printf("x" "1" "= %d, x" "2" "= s" x1, x2);' &&
-// RUN: clang-cc -E %s | grep 'fputs("strncmp(\\"abc\\\\0d\\" \\"abc\\", .\\\\4.) == 0" ": @\\n", s);' &&
-// RUN: clang-cc -E %s | grep -F 'include "vers2.h"' &&
-// RUN: clang-cc -E %s | grep -F '"hello";' &&
-// RUN: clang-cc -E %s | grep -F '"hello" ", world"'
+// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s
#define str(s) # s
#define xstr(s) str(s)
@@ -22,3 +18,10 @@ include xstr(INCFILE(2).h)
glue(HIGH, LOW);
xglue(HIGH, LOW)
+
+// CHECK: printf("x" "1" "= %d, x" "2" "= s" x1, x2);
+// CHECK: fputs("strncmp(\"abc\\0d\" \"abc\", '\\4') == 0" ": @\n", s);
+// CHECK: include "vers2.h"
+// CHECK: "hello";
+// CHECK: "hello" ", world"
+
diff --git a/test/Preprocessor/c99-6_10_3_4_p7.c b/test/Preprocessor/c99-6_10_3_4_p7.c
index a53df82..6a7eb48 100644
--- a/test/Preprocessor/c99-6_10_3_4_p7.c
+++ b/test/Preprocessor/c99-6_10_3_4_p7.c
@@ -1,9 +1,10 @@
// Example from C99 6.10.3.4p7
-// RUN: clang-cc -E %s | grep -F 'int j[] = { 123, 45, 67, 89,' &&
-// RUN: clang-cc -E %s | grep -F '10, 11, 12, };'
+// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s
#define t(x,y,z) x ## y ## z
int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,),
t(10,,), t(,11,), t(,,12), t(,,) };
+// CHECK: int j[] = { 123, 45, 67, 89,
+// CHECK: 10, 11, 12, };
diff --git a/test/Preprocessor/c99-6_10_3_4_p9.c b/test/Preprocessor/c99-6_10_3_4_p9.c
index 39c3454..704241e 100644
--- a/test/Preprocessor/c99-6_10_3_4_p9.c
+++ b/test/Preprocessor/c99-6_10_3_4_p9.c
@@ -1,16 +1,20 @@
// Example from C99 6.10.3.4p9
-// RUN: clang-cc -E %s | grep -F 'fprintf(stderr, "Flag");' &&
-// RUN: clang-cc -E %s | grep -F 'fprintf(stderr, "X = %d\n", x);' &&
-// RUN: clang-cc -E %s | grep -F 'puts("The first, second, and third items.");' &&
-// RUN: clang-cc -E %s | grep -F '((x>y)?puts("x>y"): printf("x is %d but y is %d", x, y));'
+// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define showlist(...) puts(#__VA_ARGS__)
#define report(test, ...) ((test)?puts(#test):\
printf(__VA_ARGS__))
-debug("Flag");
-debug("X = %d\n", x);
-showlist(The first, second, and third items.);
-report(x>y, "x is %d but y is %d", x, y);
+debug("Flag");
+// CHECK: fprintf(stderr, "Flag");
+
+debug("X = %d\n", x);
+// CHECK: fprintf(stderr, "X = %d\n", x);
+
+showlist(The first, second, and third items.);
+// CHECK: puts("The first, second, and third items.");
+
+report(x>y, "x is %d but y is %d", x, y);
+// CHECK: ((x>y)?puts("x>y"): printf("x is %d but y is %d", x, y));
diff --git a/test/Preprocessor/comment_save.c b/test/Preprocessor/comment_save.c
index 30b0434..ae609b1 100644
--- a/test/Preprocessor/comment_save.c
+++ b/test/Preprocessor/comment_save.c
@@ -1,7 +1,8 @@
-// RUN: clang-cc -E -C %s | grep '^// foo$' &&
-// RUN: clang-cc -E -C %s | grep -F '^/* bar */$'
+// RUN: clang-cc -E -C %s | FileCheck -strict-whitespace %s
// foo
-/* bar */
+// CHECK: // foo
+/* bar */
+// CHECK: /* bar */
diff --git a/test/Preprocessor/comment_save_macro.c b/test/Preprocessor/comment_save_macro.c
index 66b59d1..b9a25ed 100644
--- a/test/Preprocessor/comment_save_macro.c
+++ b/test/Preprocessor/comment_save_macro.c
@@ -1,6 +1,11 @@
-// RUN: clang-cc -E -C %s | grep '^boo bork bar // zot$' &&
-// RUN: clang-cc -E -CC %s | grep -F '^boo bork /* blah*/ bar // zot$' &&
-// RUN: clang-cc -E %s | grep '^boo bork bar$'
+// RUN: clang-cc -E -C %s | FileCheck -check-prefix=CHECK-C -strict-whitespace %s &&
+// CHECK-C: boo bork bar // zot
+
+// RUN: clang-cc -E -CC %s | FileCheck -check-prefix=CHECK-CC -strict-whitespace %s &&
+// CHECK-CC: boo bork /* blah*/ bar // zot
+
+// RUN: clang-cc -E %s | FileCheck -check-prefix=CHECK -strict-whitespace %s
+// CHECK: boo bork bar
#define FOO bork // blah
diff --git a/test/Preprocessor/has_include.c b/test/Preprocessor/has_include.c
new file mode 100644
index 0000000..40697c0
--- /dev/null
+++ b/test/Preprocessor/has_include.c
@@ -0,0 +1,83 @@
+// RUN: clang-cc -Eonly -verify %s
+
+// Try different path permutations of __has_include with existing file.
+#if __has_include("stdio.h")
+#else
+ #error "__has_include failed (1)."
+#endif
+
+#if __has_include(<stdio.h>)
+#else
+ #error "__has_include failed (2)."
+#endif
+
+// Try unary expression.
+#if !__has_include("stdio.h")
+ #error "__has_include failed (5)."
+#endif
+
+// Try binary expression.
+#if __has_include("stdio.h") && __has_include("stddef.h")
+#else
+ #error "__has_include failed (6)."
+#endif
+
+// Try non-existing file.
+#if __has_include("blahblah.h")
+ #error "__has_include failed (7)."
+#endif
+
+// Try defined.
+#if !defined(__has_include)
+ #error "defined(__has_include) failed (8)."
+#endif
+
+// Try different path permutations of __has_include_next with existing file.
+#if __has_include_next("stddef.h") // expected-warning {{#include_next in primary source file}}
+#else
+ #error "__has_include failed (1)."
+#endif
+
+#if __has_include_next(<stddef.h>) // expected-warning {{#include_next in primary source file}}
+#else
+ #error "__has_include failed (2)."
+#endif
+
+// Try unary expression.
+#if !__has_include_next("stdio.h") // expected-warning {{#include_next in primary source file}}
+ #error "__has_include_next failed (5)."
+#endif
+
+// Try binary expression.
+#if __has_include_next("stdio.h") && __has_include("stddef.h") // expected-warning {{#include_next in primary source file}}
+#else
+ #error "__has_include_next failed (6)."
+#endif
+
+// Try non-existing file.
+#if __has_include_next("blahblah.h") // expected-warning {{#include_next in primary source file}}
+ #error "__has_include_next failed (7)."
+#endif
+
+// Try defined.
+#if !defined(__has_include_next)
+ #error "defined(__has_include_next) failed (8)."
+#endif
+
+// Try badly formed expressions.
+// FIXME: I don't quite know how to avoid preprocessor side effects.
+// Use FileCheck?
+// It also assert due to unterminated #if's.
+//#if __has_include("stdio.h"
+//#if __has_include "stdio.h")
+//#if __has_include(stdio.h)
+//#if __has_include()
+//#if __has_include(
+//#if __has_include)
+//#if __has_include
+//#if __has_include(<stdio.h>
+//#if __has_include<stdio.h>)
+//#if __has_include("stdio.h)
+//#if __has_include(stdio.h")
+//#if __has_include(<stdio.h)
+//#if __has_include(stdio.h>)
diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c
new file mode 100644
index 0000000..800b750
--- /dev/null
+++ b/test/Preprocessor/init.c
@@ -0,0 +1,945 @@
+// RUN: clang-cc -E -dM -x=assembler-with-cpp < /dev/null | FileCheck -check-prefix ASM %s &&
+//
+// ASM:#define __ASSEMBLER__ 1
+//
+//
+// RUN: clang-cc -fblocks -E -dM < /dev/null | FileCheck -check-prefix BLOCKS %s &&
+//
+// BLOCKS:#define __BLOCKS__ 1
+// BLOCKS:#define __block __attribute__((__blocks__(byref)))
+//
+//
+// RUN: clang-cc -x=c++ -std=c++0x -E -dM < /dev/null | FileCheck -check-prefix CXX0X %s &&
+//
+// CXX0X:#define _GNU_SOURCE 1
+// CXX0X:#define __DEPRECATED 1
+// CXX0X:#define __GNUG__
+// CXX0X:#define __GXX_EXPERIMENTAL_CXX0X__ 1
+// CXX0X:#define __GXX_WEAK__ 1
+// CXX0X:#define __cplusplus 199711L
+// CXX0X:#define __private_extern__ extern
+//
+//
+// RUN: clang-cc -x=c++ -std=c++98 -E -dM < /dev/null | FileCheck -check-prefix CXX98 %s &&
+//
+// CXX98:#define _GNU_SOURCE 1
+// CXX98:#define __DEPRECATED 1
+// CXX98:#define __GNUG__
+// CXX98:#define __GXX_WEAK__ 1
+// CXX98:#define __cplusplus 199711L
+// CXX98:#define __private_extern__ extern
+//
+//
+// RUN: clang-cc -std=c99 -E -dM < /dev/null | FileCheck -check-prefix C99 %s &&
+//
+// C99:#define __STDC_VERSION__ 199901L
+// C99:#define __STRICT_ANSI__ 1
+//
+//
+// RUN: clang-cc -E -dM -fms-extensions=0 < /dev/null | FileCheck -check-prefix COMMON %s &&
+//
+// COMMON:#define __CONSTANT_CFSTRINGS__ 1
+// COMMON:#define __FINITE_MATH_ONLY__ 0
+// COMMON:#define __GNUC_MINOR__
+// COMMON:#define __GNUC_PATCHLEVEL__
+// COMMON:#define __GNUC_STDC_INLINE__ 1
+// COMMON:#define __GNUC__
+// COMMON:#define __GXX_ABI_VERSION
+// COMMON:#define __STDC_HOSTED__ 1
+// COMMON:#define __STDC_VERSION__
+// COMMON:#define __STDC__ 1
+// COMMON:#define __VERSION__
+// COMMON:#define __clang__ 1
+// COMMON:#define __llvm__ 1
+//
+//
+// RUN: clang-cc -ffreestanding -E -dM < /dev/null | FileCheck -check-prefix FREESTANDING %s &&
+// FREESTANDING:#define __STDC_HOSTED__ 0
+//
+// RUN: clang-cc -x=c++ -std=gnu++98 -E -dM < /dev/null | FileCheck -check-prefix GXX98 %s &&
+//
+// GXX98:#define _GNU_SOURCE 1
+// GXX98:#define __DEPRECATED 1
+// GXX98:#define __GNUG__
+// GXX98:#define __GXX_WEAK__ 1
+// GXX98:#define __cplusplus 1
+// GXX98:#define __private_extern__ extern
+//
+//
+// RUN: clang-cc -std=iso9899:199409 -E -dM < /dev/null | FileCheck -check-prefix C94 %s &&
+//
+// C94:#define __STDC_VERSION__ 199409L
+//
+//
+// RUN: clang-cc -fms-extensions -E -dM < /dev/null | FileCheck -check-prefix MSEXT %s &&
+//
+// MSEXT-NOT:#define __STDC__
+// MSEXT:#define __int16 __INT16_TYPE__
+// MSEXT:#define __int32 __INT32_TYPE__
+// MSEXT:#define __int64 __INT64_TYPE__
+// MSEXT:#define __int8 __INT8_TYPE__
+//
+//
+// RUN: clang-cc -x=objective-c -E -dM < /dev/null | FileCheck -check-prefix OBJC %s &&
+//
+// OBJC:#define OBJC_NEW_PROPERTIES 1
+// OBJC:#define __OBJC__ 1
+//
+//
+// RUN: clang-cc -x=objective-c -fobjc-gc -E -dM < /dev/null | FileCheck -check-prefix OBJCGC %s &&
+//
+// OBJCGC:#define __OBJC_GC__ 1
+//
+//
+// RUN: clang-cc -x=objective-c -fnext-runtime -E -dM < /dev/null | FileCheck -check-prefix NEXTRT %s &&
+//
+// NEXTRT:#define __NEXT_RUNTIME__ 1
+//
+//
+// RUN: clang-cc -x=objective-c -fobjc-nonfragile-abi -E -dM < /dev/null | FileCheck -check-prefix NONFRAGILE %s &&
+//
+// NONFRAGILE:#define OBJC_ZEROCOST_EXCEPTIONS 1
+// NONFRAGILE:#define __OBJC2__ 1
+//
+//
+// RUN: clang-cc -O1 -E -dM < /dev/null | FileCheck -check-prefix O1 %s &&
+//
+// O1:#define __OPTIMIZE__ 1
+//
+//
+// RUN: clang-cc -fpascal-strings -E -dM < /dev/null | FileCheck -check-prefix PASCAL %s &&
+//
+// PASCAL:#define __PASCAL_STRINGS__ 1
+//
+//
+// RUN: clang-cc -fsigned-char -E -dM -fms-extensions=0 < /dev/null | FileCheck -check-prefix SCHAR %s &&
+//
+// SCHAR:#define __STDC__ 1
+// SCHAR-NOT:#define __UNSIGNED_CHAR__
+// SCHAR:#define __clang__ 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=arm-none-none < /dev/null | FileCheck -check-prefix ARM %s &&
+//
+// ARM:#define __APCS_32__ 1
+// ARM:#define __ARMEL__ 1
+// ARM:#define __ARM_ARCH_6K__ 1
+// ARM:#define __CHAR_BIT__ 8
+// ARM:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// ARM:#define __DBL_DIG__ 15
+// ARM:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// ARM:#define __DBL_HAS_DENORM__ 1
+// ARM:#define __DBL_HAS_INFINITY__ 1
+// ARM:#define __DBL_HAS_QUIET_NAN__ 1
+// ARM:#define __DBL_MANT_DIG__ 53
+// ARM:#define __DBL_MAX_10_EXP__ 308
+// ARM:#define __DBL_MAX_EXP__ 1024
+// ARM:#define __DBL_MAX__ 1.7976931348623157e+308
+// ARM:#define __DBL_MIN_10_EXP__ (-307)
+// ARM:#define __DBL_MIN_EXP__ (-1021)
+// ARM:#define __DBL_MIN__ 2.2250738585072014e-308
+// ARM:#define __DECIMAL_DIG__ 17
+// ARM:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// ARM:#define __FLT_DIG__ 6
+// ARM:#define __FLT_EPSILON__ 1.19209290e-7F
+// ARM:#define __FLT_EVAL_METHOD__ 0
+// ARM:#define __FLT_HAS_DENORM__ 1
+// ARM:#define __FLT_HAS_INFINITY__ 1
+// ARM:#define __FLT_HAS_QUIET_NAN__ 1
+// ARM:#define __FLT_MANT_DIG__ 24
+// ARM:#define __FLT_MAX_10_EXP__ 38
+// ARM:#define __FLT_MAX_EXP__ 128
+// ARM:#define __FLT_MAX__ 3.40282347e+38F
+// ARM:#define __FLT_MIN_10_EXP__ (-37)
+// ARM:#define __FLT_MIN_EXP__ (-125)
+// ARM:#define __FLT_MIN__ 1.17549435e-38F
+// ARM:#define __FLT_RADIX__ 2
+// ARM:#define __INT16_TYPE__ short
+// ARM:#define __INT32_TYPE__ int
+// ARM:#define __INT64_TYPE__ long long int
+// ARM:#define __INT8_TYPE__ char
+// ARM:#define __INTMAX_MAX__ 9223372036854775807LL
+// ARM:#define __INTMAX_TYPE__ long long int
+// ARM:#define __INTPTR_TYPE__ long int
+// ARM:#define __INT_MAX__ 2147483647
+// ARM:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
+// ARM:#define __LDBL_DIG__ 15
+// ARM:#define __LDBL_EPSILON__ 2.2204460492503131e-16
+// ARM:#define __LDBL_HAS_DENORM__ 1
+// ARM:#define __LDBL_HAS_INFINITY__ 1
+// ARM:#define __LDBL_HAS_QUIET_NAN__ 1
+// ARM:#define __LDBL_MANT_DIG__ 53
+// ARM:#define __LDBL_MAX_10_EXP__ 308
+// ARM:#define __LDBL_MAX_EXP__ 1024
+// ARM:#define __LDBL_MAX__ 1.7976931348623157e+308
+// ARM:#define __LDBL_MIN_10_EXP__ (-307)
+// ARM:#define __LDBL_MIN_EXP__ (-1021)
+// ARM:#define __LDBL_MIN__ 2.2250738585072014e-308
+// ARM:#define __LITTLE_ENDIAN__ 1
+// ARM:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// ARM:#define __LONG_MAX__ 2147483647L
+// ARM:#define __NO_INLINE__ 1
+// ARM:#define __POINTER_WIDTH__ 32
+// ARM:#define __PTRDIFF_TYPE__ int
+// ARM:#define __SCHAR_MAX__ 127
+// ARM:#define __SHRT_MAX__ 32767
+// ARM:#define __SIZE_TYPE__ unsigned int
+// ARM:#define __THUMB_INTERWORK__ 1
+// ARM:#define __UINTMAX_TYPE__ long long unsigned int
+// ARM:#define __USER_LABEL_PREFIX__ _
+// ARM:#define __VFP_FP__ 1
+// ARM:#define __WCHAR_MAX__ 2147483647
+// ARM:#define __WCHAR_TYPE__ int
+// ARM:#define __WINT_TYPE__ int
+// ARM:#define __arm 1
+// ARM:#define __arm__ 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=bfin-none-none < /dev/null | FileCheck -check-prefix BFIN %s &&
+//
+// BFIN:#define BFIN 1
+// BFIN:#define __ADSPBLACKFIN__ 1
+// BFIN:#define __ADSPLPBLACKFIN__ 1
+// BFIN:#define __BFIN 1
+// BFIN:#define __BFIN__ 1
+// BFIN:#define __CHAR_BIT__ 8
+// BFIN:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// BFIN:#define __DBL_DIG__ 15
+// BFIN:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// BFIN:#define __DBL_HAS_DENORM__ 1
+// BFIN:#define __DBL_HAS_INFINITY__ 1
+// BFIN:#define __DBL_HAS_QUIET_NAN__ 1
+// BFIN:#define __DBL_MANT_DIG__ 53
+// BFIN:#define __DBL_MAX_10_EXP__ 308
+// BFIN:#define __DBL_MAX_EXP__ 1024
+// BFIN:#define __DBL_MAX__ 1.7976931348623157e+308
+// BFIN:#define __DBL_MIN_10_EXP__ (-307)
+// BFIN:#define __DBL_MIN_EXP__ (-1021)
+// BFIN:#define __DBL_MIN__ 2.2250738585072014e-308
+// BFIN:#define __DECIMAL_DIG__ 17
+// BFIN:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// BFIN:#define __FLT_DIG__ 6
+// BFIN:#define __FLT_EPSILON__ 1.19209290e-7F
+// BFIN:#define __FLT_EVAL_METHOD__ 0
+// BFIN:#define __FLT_HAS_DENORM__ 1
+// BFIN:#define __FLT_HAS_INFINITY__ 1
+// BFIN:#define __FLT_HAS_QUIET_NAN__ 1
+// BFIN:#define __FLT_MANT_DIG__ 24
+// BFIN:#define __FLT_MAX_10_EXP__ 38
+// BFIN:#define __FLT_MAX_EXP__ 128
+// BFIN:#define __FLT_MAX__ 3.40282347e+38F
+// BFIN:#define __FLT_MIN_10_EXP__ (-37)
+// BFIN:#define __FLT_MIN_EXP__ (-125)
+// BFIN:#define __FLT_MIN__ 1.17549435e-38F
+// BFIN:#define __FLT_RADIX__ 2
+// BFIN:#define __INT16_TYPE__ short
+// BFIN:#define __INT32_TYPE__ int
+// BFIN:#define __INT64_TYPE__ long long int
+// BFIN:#define __INT8_TYPE__ char
+// BFIN:#define __INTMAX_MAX__ 9223372036854775807LL
+// BFIN:#define __INTMAX_TYPE__ long long int
+// BFIN:#define __INTPTR_TYPE__ long int
+// BFIN:#define __INT_MAX__ 2147483647
+// BFIN:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
+// BFIN:#define __LDBL_DIG__ 15
+// BFIN:#define __LDBL_EPSILON__ 2.2204460492503131e-16
+// BFIN:#define __LDBL_HAS_DENORM__ 1
+// BFIN:#define __LDBL_HAS_INFINITY__ 1
+// BFIN:#define __LDBL_HAS_QUIET_NAN__ 1
+// BFIN:#define __LDBL_MANT_DIG__ 53
+// BFIN:#define __LDBL_MAX_10_EXP__ 308
+// BFIN:#define __LDBL_MAX_EXP__ 1024
+// BFIN:#define __LDBL_MAX__ 1.7976931348623157e+308
+// BFIN:#define __LDBL_MIN_10_EXP__ (-307)
+// BFIN:#define __LDBL_MIN_EXP__ (-1021)
+// BFIN:#define __LDBL_MIN__ 2.2250738585072014e-308
+// BFIN:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// BFIN:#define __LONG_MAX__ 2147483647L
+// BFIN:#define __NO_INLINE__ 1
+// BFIN:#define __POINTER_WIDTH__ 32
+// BFIN:#define __PTRDIFF_TYPE__ long int
+// BFIN:#define __SCHAR_MAX__ 127
+// BFIN:#define __SHRT_MAX__ 32767
+// BFIN:#define __SIZE_TYPE__ long unsigned int
+// BFIN:#define __UINTMAX_TYPE__ long long unsigned int
+// BFIN:#define __USER_LABEL_PREFIX__ _
+// BFIN:#define __WCHAR_MAX__ 2147483647
+// BFIN:#define __WCHAR_TYPE__ int
+// BFIN:#define __WINT_TYPE__ int
+// BFIN:#define __bfin 1
+// BFIN:#define __bfin__ 1
+// BFIN:#define bfin 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=i386-none-none < /dev/null | FileCheck -check-prefix I386 %s &&
+//
+// I386:#define __CHAR_BIT__ 8
+// I386:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// I386:#define __DBL_DIG__ 15
+// I386:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// I386:#define __DBL_HAS_DENORM__ 1
+// I386:#define __DBL_HAS_INFINITY__ 1
+// I386:#define __DBL_HAS_QUIET_NAN__ 1
+// I386:#define __DBL_MANT_DIG__ 53
+// I386:#define __DBL_MAX_10_EXP__ 308
+// I386:#define __DBL_MAX_EXP__ 1024
+// I386:#define __DBL_MAX__ 1.7976931348623157e+308
+// I386:#define __DBL_MIN_10_EXP__ (-307)
+// I386:#define __DBL_MIN_EXP__ (-1021)
+// I386:#define __DBL_MIN__ 2.2250738585072014e-308
+// I386:#define __DECIMAL_DIG__ 21
+// I386:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// I386:#define __FLT_DIG__ 6
+// I386:#define __FLT_EPSILON__ 1.19209290e-7F
+// I386:#define __FLT_EVAL_METHOD__ 0
+// I386:#define __FLT_HAS_DENORM__ 1
+// I386:#define __FLT_HAS_INFINITY__ 1
+// I386:#define __FLT_HAS_QUIET_NAN__ 1
+// I386:#define __FLT_MANT_DIG__ 24
+// I386:#define __FLT_MAX_10_EXP__ 38
+// I386:#define __FLT_MAX_EXP__ 128
+// I386:#define __FLT_MAX__ 3.40282347e+38F
+// I386:#define __FLT_MIN_10_EXP__ (-37)
+// I386:#define __FLT_MIN_EXP__ (-125)
+// I386:#define __FLT_MIN__ 1.17549435e-38F
+// I386:#define __FLT_RADIX__ 2
+// I386:#define __INT16_TYPE__ short
+// I386:#define __INT32_TYPE__ int
+// I386:#define __INT64_TYPE__ long long int
+// I386:#define __INT8_TYPE__ char
+// I386:#define __INTMAX_MAX__ 9223372036854775807LL
+// I386:#define __INTMAX_TYPE__ long long int
+// I386:#define __INTPTR_TYPE__ int
+// I386:#define __INT_MAX__ 2147483647
+// I386:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
+// I386:#define __LDBL_DIG__ 18
+// I386:#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
+// I386:#define __LDBL_HAS_DENORM__ 1
+// I386:#define __LDBL_HAS_INFINITY__ 1
+// I386:#define __LDBL_HAS_QUIET_NAN__ 1
+// I386:#define __LDBL_MANT_DIG__ 64
+// I386:#define __LDBL_MAX_10_EXP__ 4932
+// I386:#define __LDBL_MAX_EXP__ 16384
+// I386:#define __LDBL_MAX__ 1.18973149535723176502e+4932L
+// I386:#define __LDBL_MIN_10_EXP__ (-4931)
+// I386:#define __LDBL_MIN_EXP__ (-16381)
+// I386:#define __LDBL_MIN__ 3.36210314311209350626e-4932L
+// I386:#define __LITTLE_ENDIAN__ 1
+// I386:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// I386:#define __LONG_MAX__ 2147483647L
+// I386:#define __NO_INLINE__ 1
+// I386:#define __NO_MATH_INLINES 1
+// I386:#define __POINTER_WIDTH__ 32
+// I386:#define __PTRDIFF_TYPE__ int
+// I386:#define __REGISTER_PREFIX__
+// I386:#define __SCHAR_MAX__ 127
+// I386:#define __SHRT_MAX__ 32767
+// I386:#define __SIZE_TYPE__ unsigned int
+// I386:#define __UINTMAX_TYPE__ long long unsigned int
+// I386:#define __USER_LABEL_PREFIX__ _
+// I386:#define __WCHAR_MAX__ 2147483647
+// I386:#define __WCHAR_TYPE__ int
+// I386:#define __WINT_TYPE__ int
+// I386:#define __i386 1
+// I386:#define __i386__ 1
+// I386:#define __nocona 1
+// I386:#define __nocona__ 1
+// I386:#define __tune_nocona__ 1
+// I386:#define i386 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=msp430-none-none < /dev/null | FileCheck -check-prefix MSP430 %s &&
+//
+// MSP430:#define MSP430 1
+// MSP430:#define __CHAR_BIT__ 8
+// MSP430:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// MSP430:#define __DBL_DIG__ 15
+// MSP430:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// MSP430:#define __DBL_HAS_DENORM__ 1
+// MSP430:#define __DBL_HAS_INFINITY__ 1
+// MSP430:#define __DBL_HAS_QUIET_NAN__ 1
+// MSP430:#define __DBL_MANT_DIG__ 53
+// MSP430:#define __DBL_MAX_10_EXP__ 308
+// MSP430:#define __DBL_MAX_EXP__ 1024
+// MSP430:#define __DBL_MAX__ 1.7976931348623157e+308
+// MSP430:#define __DBL_MIN_10_EXP__ (-307)
+// MSP430:#define __DBL_MIN_EXP__ (-1021)
+// MSP430:#define __DBL_MIN__ 2.2250738585072014e-308
+// MSP430:#define __DECIMAL_DIG__ 17
+// MSP430:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// MSP430:#define __FLT_DIG__ 6
+// MSP430:#define __FLT_EPSILON__ 1.19209290e-7F
+// MSP430:#define __FLT_EVAL_METHOD__ 0
+// MSP430:#define __FLT_HAS_DENORM__ 1
+// MSP430:#define __FLT_HAS_INFINITY__ 1
+// MSP430:#define __FLT_HAS_QUIET_NAN__ 1
+// MSP430:#define __FLT_MANT_DIG__ 24
+// MSP430:#define __FLT_MAX_10_EXP__ 38
+// MSP430:#define __FLT_MAX_EXP__ 128
+// MSP430:#define __FLT_MAX__ 3.40282347e+38F
+// MSP430:#define __FLT_MIN_10_EXP__ (-37)
+// MSP430:#define __FLT_MIN_EXP__ (-125)
+// MSP430:#define __FLT_MIN__ 1.17549435e-38F
+// MSP430:#define __FLT_RADIX__ 2
+// MSP430:#define __INT16_TYPE__ short
+// MSP430:#define __INT32_TYPE__ long long
+// MSP430:#define __INT8_TYPE__ char
+// MSP430:#define __INTMAX_MAX__ 2147483647L
+// MSP430:#define __INTMAX_TYPE__ long int
+// MSP430:#define __INTPTR_TYPE__ short
+// MSP430:#define __INT_MAX__ 32767
+// MSP430:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
+// MSP430:#define __LDBL_DIG__ 15
+// MSP430:#define __LDBL_EPSILON__ 2.2204460492503131e-16
+// MSP430:#define __LDBL_HAS_DENORM__ 1
+// MSP430:#define __LDBL_HAS_INFINITY__ 1
+// MSP430:#define __LDBL_HAS_QUIET_NAN__ 1
+// MSP430:#define __LDBL_MANT_DIG__ 53
+// MSP430:#define __LDBL_MAX_10_EXP__ 308
+// MSP430:#define __LDBL_MAX_EXP__ 1024
+// MSP430:#define __LDBL_MAX__ 1.7976931348623157e+308
+// MSP430:#define __LDBL_MIN_10_EXP__ (-307)
+// MSP430:#define __LDBL_MIN_EXP__ (-1021)
+// MSP430:#define __LDBL_MIN__ 2.2250738585072014e-308
+// MSP430:#define __LONG_LONG_MAX__ 2147483647LL
+// MSP430:#define __LONG_MAX__ 2147483647L
+// MSP430:#define __MSP430__ 1
+// MSP430:#define __NO_INLINE__ 1
+// MSP430:#define __POINTER_WIDTH__ 16
+// MSP430:#define __PTRDIFF_TYPE__ int
+// MSP430:#define __SCHAR_MAX__ 127
+// MSP430:#define __SHRT_MAX__ 32767
+// MSP430:#define __SIZE_TYPE__ unsigned int
+// MSP430:#define __UINTMAX_TYPE__ long unsigned int
+// MSP430:#define __USER_LABEL_PREFIX__ _
+// MSP430:#define __WCHAR_MAX__ 2147483647
+// MSP430:#define __WCHAR_TYPE__ int
+// MSP430:#define __WINT_TYPE__ int
+// MSP430:#define __clang__ 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=pic16-none-none < /dev/null | FileCheck -check-prefix PIC16 %s &&
+//
+// PIC16:#define _CONFIG(conf) asm("CONFIG "#conf)
+// PIC16:#define __CHAR_BIT__ 8
+// PIC16:#define __DBL_DENORM_MIN__ 1.40129846e-45F
+// PIC16:#define __DBL_DIG__ 6
+// PIC16:#define __DBL_EPSILON__ 1.19209290e-7F
+// PIC16:#define __DBL_HAS_DENORM__ 1
+// PIC16:#define __DBL_HAS_INFINITY__ 1
+// PIC16:#define __DBL_HAS_QUIET_NAN__ 1
+// PIC16:#define __DBL_MANT_DIG__ 24
+// PIC16:#define __DBL_MAX_10_EXP__ 38
+// PIC16:#define __DBL_MAX_EXP__ 128
+// PIC16:#define __DBL_MAX__ 3.40282347e+38F
+// PIC16:#define __DBL_MIN_10_EXP__ (-37)
+// PIC16:#define __DBL_MIN_EXP__ (-125)
+// PIC16:#define __DBL_MIN__ 1.17549435e-38F
+// PIC16:#define __DECIMAL_DIG__ -1
+// PIC16:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// PIC16:#define __FLT_DIG__ 6
+// PIC16:#define __FLT_EPSILON__ 1.19209290e-7F
+// PIC16:#define __FLT_EVAL_METHOD__ 0
+// PIC16:#define __FLT_HAS_DENORM__ 1
+// PIC16:#define __FLT_HAS_INFINITY__ 1
+// PIC16:#define __FLT_HAS_QUIET_NAN__ 1
+// PIC16:#define __FLT_MANT_DIG__ 24
+// PIC16:#define __FLT_MAX_10_EXP__ 38
+// PIC16:#define __FLT_MAX_EXP__ 128
+// PIC16:#define __FLT_MAX__ 3.40282347e+38F
+// PIC16:#define __FLT_MIN_10_EXP__ (-37)
+// PIC16:#define __FLT_MIN_EXP__ (-125)
+// PIC16:#define __FLT_MIN__ 1.17549435e-38F
+// PIC16:#define __FLT_RADIX__ 2
+// PIC16:#define __INT16_TYPE__ short
+// PIC16:#define __INT32_TYPE__ long long
+// PIC16:#define __INT8_TYPE__ char
+// PIC16:#define __INTMAX_MAX__ 2147483647L
+// PIC16:#define __INTMAX_TYPE__ long int
+// PIC16:#define __INTPTR_TYPE__ short
+// PIC16:#define __INT_MAX__ 32767
+// PIC16:#define __LDBL_DENORM_MIN__ 1.40129846e-45F
+// PIC16:#define __LDBL_DIG__ 6
+// PIC16:#define __LDBL_EPSILON__ 1.19209290e-7F
+// PIC16:#define __LDBL_HAS_DENORM__ 1
+// PIC16:#define __LDBL_HAS_INFINITY__ 1
+// PIC16:#define __LDBL_HAS_QUIET_NAN__ 1
+// PIC16:#define __LDBL_MANT_DIG__ 24
+// PIC16:#define __LDBL_MAX_10_EXP__ 38
+// PIC16:#define __LDBL_MAX_EXP__ 128
+// PIC16:#define __LDBL_MAX__ 3.40282347e+38F
+// PIC16:#define __LDBL_MIN_10_EXP__ (-37)
+// PIC16:#define __LDBL_MIN_EXP__ (-125)
+// PIC16:#define __LDBL_MIN__ 1.17549435e-38F
+// PIC16:#define __LONG_LONG_MAX__ 2147483647LL
+// PIC16:#define __LONG_MAX__ 2147483647L
+// PIC16:#define __NO_INLINE__ 1
+// PIC16:#define __POINTER_WIDTH__ 16
+// PIC16:#define __PTRDIFF_TYPE__ int
+// PIC16:#define __SCHAR_MAX__ 127
+// PIC16:#define __SHRT_MAX__ 32767
+// PIC16:#define __SIZE_TYPE__ unsigned int
+// PIC16:#define __UINTMAX_TYPE__ long unsigned int
+// PIC16:#define __USER_LABEL_PREFIX__ _
+// PIC16:#define __WCHAR_MAX__ 2147483647
+// PIC16:#define __WCHAR_TYPE__ int
+// PIC16:#define __WINT_TYPE__ int
+// PIC16:#define __clang__ 1
+// PIC16:#define __llvm__ 1
+// PIC16:#define __pic16 1
+// PIC16:#define _address(Addr) __attribute__((section("Address="#Addr)))
+// PIC16:#define _interrupt __attribute__((section("interrupt=0x4"))) __attribute__((used))
+// PIC16:#define _section(SectName) __attribute__((section(SectName)))
+// PIC16:#define ram __attribute__((address_space(0)))
+// PIC16:#define rom __attribute__((address_space(1)))
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=powerpc64-none-none < /dev/null | FileCheck -check-prefix PPC64 %s &&
+//
+// PPC64:#define _ARCH_PPC 1
+// PPC64:#define _ARCH_PPC64 1
+// PPC64:#define _BIG_ENDIAN 1
+// PPC64:#define _LP64 1
+// PPC64:#define __BIG_ENDIAN__ 1
+// PPC64:#define __CHAR_BIT__ 8
+// PPC64:#define __CHAR_UNSIGNED__ 1
+// PPC64:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// PPC64:#define __DBL_DIG__ 15
+// PPC64:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// PPC64:#define __DBL_HAS_DENORM__ 1
+// PPC64:#define __DBL_HAS_INFINITY__ 1
+// PPC64:#define __DBL_HAS_QUIET_NAN__ 1
+// PPC64:#define __DBL_MANT_DIG__ 53
+// PPC64:#define __DBL_MAX_10_EXP__ 308
+// PPC64:#define __DBL_MAX_EXP__ 1024
+// PPC64:#define __DBL_MAX__ 1.7976931348623157e+308
+// PPC64:#define __DBL_MIN_10_EXP__ (-307)
+// PPC64:#define __DBL_MIN_EXP__ (-1021)
+// PPC64:#define __DBL_MIN__ 2.2250738585072014e-308
+// PPC64:#define __DECIMAL_DIG__ 17
+// PPC64:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// PPC64:#define __FLT_DIG__ 6
+// PPC64:#define __FLT_EPSILON__ 1.19209290e-7F
+// PPC64:#define __FLT_EVAL_METHOD__ 0
+// PPC64:#define __FLT_HAS_DENORM__ 1
+// PPC64:#define __FLT_HAS_INFINITY__ 1
+// PPC64:#define __FLT_HAS_QUIET_NAN__ 1
+// PPC64:#define __FLT_MANT_DIG__ 24
+// PPC64:#define __FLT_MAX_10_EXP__ 38
+// PPC64:#define __FLT_MAX_EXP__ 128
+// PPC64:#define __FLT_MAX__ 3.40282347e+38F
+// PPC64:#define __FLT_MIN_10_EXP__ (-37)
+// PPC64:#define __FLT_MIN_EXP__ (-125)
+// PPC64:#define __FLT_MIN__ 1.17549435e-38F
+// PPC64:#define __FLT_RADIX__ 2
+// PPC64:#define __INT16_TYPE__ short
+// PPC64:#define __INT32_TYPE__ int
+// PPC64:#define __INT64_TYPE__ long int
+// PPC64:#define __INT8_TYPE__ char
+// PPC64:#define __INTMAX_MAX__ 9223372036854775807L
+// PPC64:#define __INTMAX_TYPE__ long int
+// PPC64:#define __INTPTR_TYPE__ long int
+// PPC64:#define __INT_MAX__ 2147483647
+// PPC64:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
+// PPC64:#define __LDBL_DIG__ 15
+// PPC64:#define __LDBL_EPSILON__ 2.2204460492503131e-16
+// PPC64:#define __LDBL_HAS_DENORM__ 1
+// PPC64:#define __LDBL_HAS_INFINITY__ 1
+// PPC64:#define __LDBL_HAS_QUIET_NAN__ 1
+// PPC64:#define __LDBL_MANT_DIG__ 53
+// PPC64:#define __LDBL_MAX_10_EXP__ 308
+// PPC64:#define __LDBL_MAX_EXP__ 1024
+// PPC64:#define __LDBL_MAX__ 1.7976931348623157e+308
+// PPC64:#define __LDBL_MIN_10_EXP__ (-307)
+// PPC64:#define __LDBL_MIN_EXP__ (-1021)
+// PPC64:#define __LDBL_MIN__ 2.2250738585072014e-308
+// PPC64:#define __LONG_DOUBLE_128__ 1
+// PPC64:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// PPC64:#define __LONG_MAX__ 9223372036854775807L
+// PPC64:#define __LP64__ 1
+// PPC64:#define __NATURAL_ALIGNMENT__ 1
+// PPC64:#define __NO_INLINE__ 1
+// PPC64:#define __POINTER_WIDTH__ 64
+// PPC64:#define __POWERPC__ 1
+// PPC64:#define __PTRDIFF_TYPE__ long int
+// PPC64:#define __REGISTER_PREFIX__
+// PPC64:#define __SCHAR_MAX__ 127
+// PPC64:#define __SHRT_MAX__ 32767
+// PPC64:#define __SIZE_TYPE__ long unsigned int
+// PPC64:#define __UINTMAX_TYPE__ long unsigned int
+// PPC64:#define __USER_LABEL_PREFIX__ _
+// PPC64:#define __WCHAR_MAX__ 2147483647
+// PPC64:#define __WCHAR_TYPE__ int
+// PPC64:#define __WINT_TYPE__ int
+// PPC64:#define __ppc64__ 1
+// PPC64:#define __ppc__ 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=powerpc-none-none < /dev/null | FileCheck -check-prefix PPC %s &&
+//
+// PPC:#define _ARCH_PPC 1
+// PPC:#define _BIG_ENDIAN 1
+// PPC:#define __BIG_ENDIAN__ 1
+// PPC:#define __CHAR_BIT__ 8
+// PPC:#define __CHAR_UNSIGNED__ 1
+// PPC:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// PPC:#define __DBL_DIG__ 15
+// PPC:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// PPC:#define __DBL_HAS_DENORM__ 1
+// PPC:#define __DBL_HAS_INFINITY__ 1
+// PPC:#define __DBL_HAS_QUIET_NAN__ 1
+// PPC:#define __DBL_MANT_DIG__ 53
+// PPC:#define __DBL_MAX_10_EXP__ 308
+// PPC:#define __DBL_MAX_EXP__ 1024
+// PPC:#define __DBL_MAX__ 1.7976931348623157e+308
+// PPC:#define __DBL_MIN_10_EXP__ (-307)
+// PPC:#define __DBL_MIN_EXP__ (-1021)
+// PPC:#define __DBL_MIN__ 2.2250738585072014e-308
+// PPC:#define __DECIMAL_DIG__ 17
+// PPC:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// PPC:#define __FLT_DIG__ 6
+// PPC:#define __FLT_EPSILON__ 1.19209290e-7F
+// PPC:#define __FLT_EVAL_METHOD__ 0
+// PPC:#define __FLT_HAS_DENORM__ 1
+// PPC:#define __FLT_HAS_INFINITY__ 1
+// PPC:#define __FLT_HAS_QUIET_NAN__ 1
+// PPC:#define __FLT_MANT_DIG__ 24
+// PPC:#define __FLT_MAX_10_EXP__ 38
+// PPC:#define __FLT_MAX_EXP__ 128
+// PPC:#define __FLT_MAX__ 3.40282347e+38F
+// PPC:#define __FLT_MIN_10_EXP__ (-37)
+// PPC:#define __FLT_MIN_EXP__ (-125)
+// PPC:#define __FLT_MIN__ 1.17549435e-38F
+// PPC:#define __FLT_RADIX__ 2
+// PPC:#define __INT16_TYPE__ short
+// PPC:#define __INT32_TYPE__ int
+// PPC:#define __INT64_TYPE__ long long int
+// PPC:#define __INT8_TYPE__ char
+// PPC:#define __INTMAX_MAX__ 9223372036854775807LL
+// PPC:#define __INTMAX_TYPE__ long long int
+// PPC:#define __INTPTR_TYPE__ long int
+// PPC:#define __INT_MAX__ 2147483647
+// PPC:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
+// PPC:#define __LDBL_DIG__ 15
+// PPC:#define __LDBL_EPSILON__ 2.2204460492503131e-16
+// PPC:#define __LDBL_HAS_DENORM__ 1
+// PPC:#define __LDBL_HAS_INFINITY__ 1
+// PPC:#define __LDBL_HAS_QUIET_NAN__ 1
+// PPC:#define __LDBL_MANT_DIG__ 53
+// PPC:#define __LDBL_MAX_10_EXP__ 308
+// PPC:#define __LDBL_MAX_EXP__ 1024
+// PPC:#define __LDBL_MAX__ 1.7976931348623157e+308
+// PPC:#define __LDBL_MIN_10_EXP__ (-307)
+// PPC:#define __LDBL_MIN_EXP__ (-1021)
+// PPC:#define __LDBL_MIN__ 2.2250738585072014e-308
+// PPC:#define __LONG_DOUBLE_128__ 1
+// PPC:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// PPC:#define __LONG_MAX__ 2147483647L
+// PPC:#define __NATURAL_ALIGNMENT__ 1
+// PPC:#define __NO_INLINE__ 1
+// PPC:#define __POINTER_WIDTH__ 32
+// PPC:#define __POWERPC__ 1
+// PPC:#define __PTRDIFF_TYPE__ long int
+// PPC:#define __REGISTER_PREFIX__
+// PPC:#define __SCHAR_MAX__ 127
+// PPC:#define __SHRT_MAX__ 32767
+// PPC:#define __SIZE_TYPE__ long unsigned int
+// PPC:#define __UINTMAX_TYPE__ long long unsigned int
+// PPC:#define __USER_LABEL_PREFIX__ _
+// PPC:#define __WCHAR_MAX__ 2147483647
+// PPC:#define __WCHAR_TYPE__ int
+// PPC:#define __WINT_TYPE__ int
+// PPC:#define __ppc__ 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=s390x-none-none < /dev/null | FileCheck -check-prefix S390X %s &&
+//
+// S390X:#define __CHAR_BIT__ 8
+// S390X:#define __CHAR_UNSIGNED__ 1
+// S390X:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// S390X:#define __DBL_DIG__ 15
+// S390X:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// S390X:#define __DBL_HAS_DENORM__ 1
+// S390X:#define __DBL_HAS_INFINITY__ 1
+// S390X:#define __DBL_HAS_QUIET_NAN__ 1
+// S390X:#define __DBL_MANT_DIG__ 53
+// S390X:#define __DBL_MAX_10_EXP__ 308
+// S390X:#define __DBL_MAX_EXP__ 1024
+// S390X:#define __DBL_MAX__ 1.7976931348623157e+308
+// S390X:#define __DBL_MIN_10_EXP__ (-307)
+// S390X:#define __DBL_MIN_EXP__ (-1021)
+// S390X:#define __DBL_MIN__ 2.2250738585072014e-308
+// S390X:#define __DECIMAL_DIG__ 17
+// S390X:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// S390X:#define __FLT_DIG__ 6
+// S390X:#define __FLT_EPSILON__ 1.19209290e-7F
+// S390X:#define __FLT_EVAL_METHOD__ 0
+// S390X:#define __FLT_HAS_DENORM__ 1
+// S390X:#define __FLT_HAS_INFINITY__ 1
+// S390X:#define __FLT_HAS_QUIET_NAN__ 1
+// S390X:#define __FLT_MANT_DIG__ 24
+// S390X:#define __FLT_MAX_10_EXP__ 38
+// S390X:#define __FLT_MAX_EXP__ 128
+// S390X:#define __FLT_MAX__ 3.40282347e+38F
+// S390X:#define __FLT_MIN_10_EXP__ (-37)
+// S390X:#define __FLT_MIN_EXP__ (-125)
+// S390X:#define __FLT_MIN__ 1.17549435e-38F
+// S390X:#define __FLT_RADIX__ 2
+// S390X:#define __INT16_TYPE__ short
+// S390X:#define __INT32_TYPE__ int
+// S390X:#define __INT64_TYPE__ long long int
+// S390X:#define __INT8_TYPE__ char
+// S390X:#define __INTMAX_MAX__ 9223372036854775807LL
+// S390X:#define __INTMAX_TYPE__ long long int
+// S390X:#define __INTPTR_TYPE__ long int
+// S390X:#define __INT_MAX__ 2147483647
+// S390X:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
+// S390X:#define __LDBL_DIG__ 15
+// S390X:#define __LDBL_EPSILON__ 2.2204460492503131e-16
+// S390X:#define __LDBL_HAS_DENORM__ 1
+// S390X:#define __LDBL_HAS_INFINITY__ 1
+// S390X:#define __LDBL_HAS_QUIET_NAN__ 1
+// S390X:#define __LDBL_MANT_DIG__ 53
+// S390X:#define __LDBL_MAX_10_EXP__ 308
+// S390X:#define __LDBL_MAX_EXP__ 1024
+// S390X:#define __LDBL_MAX__ 1.7976931348623157e+308
+// S390X:#define __LDBL_MIN_10_EXP__ (-307)
+// S390X:#define __LDBL_MIN_EXP__ (-1021)
+// S390X:#define __LDBL_MIN__ 2.2250738585072014e-308
+// S390X:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// S390X:#define __LONG_MAX__ 9223372036854775807L
+// S390X:#define __NO_INLINE__ 1
+// S390X:#define __POINTER_WIDTH__ 64
+// S390X:#define __PTRDIFF_TYPE__ long int
+// S390X:#define __SCHAR_MAX__ 127
+// S390X:#define __SHRT_MAX__ 32767
+// S390X:#define __SIZE_TYPE__ long unsigned int
+// S390X:#define __UINTMAX_TYPE__ long long unsigned int
+// S390X:#define __USER_LABEL_PREFIX__ _
+// S390X:#define __WCHAR_MAX__ 2147483647
+// S390X:#define __WCHAR_TYPE__ int
+// S390X:#define __WINT_TYPE__ int
+// S390X:#define __s390__ 1
+// S390X:#define __s390x__ 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=sparc-none-none < /dev/null | FileCheck -check-prefix SPARC %s &&
+//
+// SPARC:#define __CHAR_BIT__ 8
+// SPARC:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// SPARC:#define __DBL_DIG__ 15
+// SPARC:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// SPARC:#define __DBL_HAS_DENORM__ 1
+// SPARC:#define __DBL_HAS_INFINITY__ 1
+// SPARC:#define __DBL_HAS_QUIET_NAN__ 1
+// SPARC:#define __DBL_MANT_DIG__ 53
+// SPARC:#define __DBL_MAX_10_EXP__ 308
+// SPARC:#define __DBL_MAX_EXP__ 1024
+// SPARC:#define __DBL_MAX__ 1.7976931348623157e+308
+// SPARC:#define __DBL_MIN_10_EXP__ (-307)
+// SPARC:#define __DBL_MIN_EXP__ (-1021)
+// SPARC:#define __DBL_MIN__ 2.2250738585072014e-308
+// SPARC:#define __DECIMAL_DIG__ 17
+// SPARC:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// SPARC:#define __FLT_DIG__ 6
+// SPARC:#define __FLT_EPSILON__ 1.19209290e-7F
+// SPARC:#define __FLT_EVAL_METHOD__ 0
+// SPARC:#define __FLT_HAS_DENORM__ 1
+// SPARC:#define __FLT_HAS_INFINITY__ 1
+// SPARC:#define __FLT_HAS_QUIET_NAN__ 1
+// SPARC:#define __FLT_MANT_DIG__ 24
+// SPARC:#define __FLT_MAX_10_EXP__ 38
+// SPARC:#define __FLT_MAX_EXP__ 128
+// SPARC:#define __FLT_MAX__ 3.40282347e+38F
+// SPARC:#define __FLT_MIN_10_EXP__ (-37)
+// SPARC:#define __FLT_MIN_EXP__ (-125)
+// SPARC:#define __FLT_MIN__ 1.17549435e-38F
+// SPARC:#define __FLT_RADIX__ 2
+// SPARC:#define __INT16_TYPE__ short
+// SPARC:#define __INT32_TYPE__ int
+// SPARC:#define __INT64_TYPE__ long long int
+// SPARC:#define __INT8_TYPE__ char
+// SPARC:#define __INTMAX_MAX__ 9223372036854775807LL
+// SPARC:#define __INTMAX_TYPE__ long long int
+// SPARC:#define __INTPTR_TYPE__ long int
+// SPARC:#define __INT_MAX__ 2147483647
+// SPARC:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324
+// SPARC:#define __LDBL_DIG__ 15
+// SPARC:#define __LDBL_EPSILON__ 2.2204460492503131e-16
+// SPARC:#define __LDBL_HAS_DENORM__ 1
+// SPARC:#define __LDBL_HAS_INFINITY__ 1
+// SPARC:#define __LDBL_HAS_QUIET_NAN__ 1
+// SPARC:#define __LDBL_MANT_DIG__ 53
+// SPARC:#define __LDBL_MAX_10_EXP__ 308
+// SPARC:#define __LDBL_MAX_EXP__ 1024
+// SPARC:#define __LDBL_MAX__ 1.7976931348623157e+308
+// SPARC:#define __LDBL_MIN_10_EXP__ (-307)
+// SPARC:#define __LDBL_MIN_EXP__ (-1021)
+// SPARC:#define __LDBL_MIN__ 2.2250738585072014e-308
+// SPARC:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// SPARC:#define __LONG_MAX__ 2147483647L
+// SPARC:#define __NO_INLINE__ 1
+// SPARC:#define __POINTER_WIDTH__ 32
+// SPARC:#define __PTRDIFF_TYPE__ long int
+// SPARC:#define __REGISTER_PREFIX__
+// SPARC:#define __SCHAR_MAX__ 127
+// SPARC:#define __SHRT_MAX__ 32767
+// SPARC:#define __SIZE_TYPE__ long unsigned int
+// SPARC:#define __UINTMAX_TYPE__ long long unsigned int
+// SPARC:#define __USER_LABEL_PREFIX__ _
+// SPARC:#define __VERSION__ "4.2.1 Compatible Clang Compiler"
+// SPARC:#define __WCHAR_MAX__ 2147483647
+// SPARC:#define __WCHAR_TYPE__ int
+// SPARC:#define __WINT_TYPE__ int
+// SPARC:#define __sparc 1
+// SPARC:#define __sparc__ 1
+// SPARC:#define __sparcv8 1
+// SPARC:#define sparc 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=tce-none-none < /dev/null | FileCheck -check-prefix TCE %s &&
+//
+// TCE:#define __CHAR_BIT__ 8
+// TCE:#define __DBL_DENORM_MIN__ 1.40129846e-45F
+// TCE:#define __DBL_DIG__ 6
+// TCE:#define __DBL_EPSILON__ 1.19209290e-7F
+// TCE:#define __DBL_HAS_DENORM__ 1
+// TCE:#define __DBL_HAS_INFINITY__ 1
+// TCE:#define __DBL_HAS_QUIET_NAN__ 1
+// TCE:#define __DBL_MANT_DIG__ 24
+// TCE:#define __DBL_MAX_10_EXP__ 38
+// TCE:#define __DBL_MAX_EXP__ 128
+// TCE:#define __DBL_MAX__ 3.40282347e+38F
+// TCE:#define __DBL_MIN_10_EXP__ (-37)
+// TCE:#define __DBL_MIN_EXP__ (-125)
+// TCE:#define __DBL_MIN__ 1.17549435e-38F
+// TCE:#define __DECIMAL_DIG__ -1
+// TCE:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// TCE:#define __FLT_DIG__ 6
+// TCE:#define __FLT_EPSILON__ 1.19209290e-7F
+// TCE:#define __FLT_EVAL_METHOD__ 0
+// TCE:#define __FLT_HAS_DENORM__ 1
+// TCE:#define __FLT_HAS_INFINITY__ 1
+// TCE:#define __FLT_HAS_QUIET_NAN__ 1
+// TCE:#define __FLT_MANT_DIG__ 24
+// TCE:#define __FLT_MAX_10_EXP__ 38
+// TCE:#define __FLT_MAX_EXP__ 128
+// TCE:#define __FLT_MAX__ 3.40282347e+38F
+// TCE:#define __FLT_MIN_10_EXP__ (-37)
+// TCE:#define __FLT_MIN_EXP__ (-125)
+// TCE:#define __FLT_MIN__ 1.17549435e-38F
+// TCE:#define __FLT_RADIX__ 2
+// TCE:#define __INT16_TYPE__ short
+// TCE:#define __INT32_TYPE__ int
+// TCE:#define __INT8_TYPE__ char
+// TCE:#define __INTMAX_MAX__ 2147483647L
+// TCE:#define __INTMAX_TYPE__ long int
+// TCE:#define __INTPTR_TYPE__ int
+// TCE:#define __INT_MAX__ 2147483647
+// TCE:#define __LDBL_DENORM_MIN__ 1.40129846e-45F
+// TCE:#define __LDBL_DIG__ 6
+// TCE:#define __LDBL_EPSILON__ 1.19209290e-7F
+// TCE:#define __LDBL_HAS_DENORM__ 1
+// TCE:#define __LDBL_HAS_INFINITY__ 1
+// TCE:#define __LDBL_HAS_QUIET_NAN__ 1
+// TCE:#define __LDBL_MANT_DIG__ 24
+// TCE:#define __LDBL_MAX_10_EXP__ 38
+// TCE:#define __LDBL_MAX_EXP__ 128
+// TCE:#define __LDBL_MAX__ 3.40282347e+38F
+// TCE:#define __LDBL_MIN_10_EXP__ (-37)
+// TCE:#define __LDBL_MIN_EXP__ (-125)
+// TCE:#define __LDBL_MIN__ 1.17549435e-38F
+// TCE:#define __LONG_LONG_MAX__ 2147483647LL
+// TCE:#define __LONG_MAX__ 2147483647L
+// TCE:#define __NO_INLINE__ 1
+// TCE:#define __POINTER_WIDTH__ 32
+// TCE:#define __PTRDIFF_TYPE__ int
+// TCE:#define __SCHAR_MAX__ 127
+// TCE:#define __SHRT_MAX__ 32767
+// TCE:#define __SIZE_TYPE__ unsigned int
+// TCE:#define __TCE_V1__ 1
+// TCE:#define __TCE__ 1
+// TCE:#define __UINTMAX_TYPE__ long unsigned int
+// TCE:#define __USER_LABEL_PREFIX__ _
+// TCE:#define __WCHAR_MAX__ 2147483647
+// TCE:#define __WCHAR_TYPE__ int
+// TCE:#define __WINT_TYPE__ int
+// TCE:#define __tce 1
+// TCE:#define __tce__ 1
+// TCE:#define tce 1
+//
+// RUN: clang-cc -E -dM -ffreestanding -triple=x86_64-none-none < /dev/null | FileCheck -check-prefix X86_64 %s &&
+//
+// X86_64:#define _LP64 1
+// X86_64:#define __CHAR_BIT__ 8
+// X86_64:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// X86_64:#define __DBL_DIG__ 15
+// X86_64:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// X86_64:#define __DBL_HAS_DENORM__ 1
+// X86_64:#define __DBL_HAS_INFINITY__ 1
+// X86_64:#define __DBL_HAS_QUIET_NAN__ 1
+// X86_64:#define __DBL_MANT_DIG__ 53
+// X86_64:#define __DBL_MAX_10_EXP__ 308
+// X86_64:#define __DBL_MAX_EXP__ 1024
+// X86_64:#define __DBL_MAX__ 1.7976931348623157e+308
+// X86_64:#define __DBL_MIN_10_EXP__ (-307)
+// X86_64:#define __DBL_MIN_EXP__ (-1021)
+// X86_64:#define __DBL_MIN__ 2.2250738585072014e-308
+// X86_64:#define __DECIMAL_DIG__ 21
+// X86_64:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// X86_64:#define __FLT_DIG__ 6
+// X86_64:#define __FLT_EPSILON__ 1.19209290e-7F
+// X86_64:#define __FLT_EVAL_METHOD__ 0
+// X86_64:#define __FLT_HAS_DENORM__ 1
+// X86_64:#define __FLT_HAS_INFINITY__ 1
+// X86_64:#define __FLT_HAS_QUIET_NAN__ 1
+// X86_64:#define __FLT_MANT_DIG__ 24
+// X86_64:#define __FLT_MAX_10_EXP__ 38
+// X86_64:#define __FLT_MAX_EXP__ 128
+// X86_64:#define __FLT_MAX__ 3.40282347e+38F
+// X86_64:#define __FLT_MIN_10_EXP__ (-37)
+// X86_64:#define __FLT_MIN_EXP__ (-125)
+// X86_64:#define __FLT_MIN__ 1.17549435e-38F
+// X86_64:#define __FLT_RADIX__ 2
+// X86_64:#define __INT16_TYPE__ short
+// X86_64:#define __INT32_TYPE__ int
+// X86_64:#define __INT64_TYPE__ long int
+// X86_64:#define __INT8_TYPE__ char
+// X86_64:#define __INTMAX_MAX__ 9223372036854775807L
+// X86_64:#define __INTMAX_TYPE__ long int
+// X86_64:#define __INTPTR_TYPE__ long int
+// X86_64:#define __INT_MAX__ 2147483647
+// X86_64:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
+// X86_64:#define __LDBL_DIG__ 18
+// X86_64:#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
+// X86_64:#define __LDBL_HAS_DENORM__ 1
+// X86_64:#define __LDBL_HAS_INFINITY__ 1
+// X86_64:#define __LDBL_HAS_QUIET_NAN__ 1
+// X86_64:#define __LDBL_MANT_DIG__ 64
+// X86_64:#define __LDBL_MAX_10_EXP__ 4932
+// X86_64:#define __LDBL_MAX_EXP__ 16384
+// X86_64:#define __LDBL_MAX__ 1.18973149535723176502e+4932L
+// X86_64:#define __LDBL_MIN_10_EXP__ (-4931)
+// X86_64:#define __LDBL_MIN_EXP__ (-16381)
+// X86_64:#define __LDBL_MIN__ 3.36210314311209350626e-4932L
+// X86_64:#define __LITTLE_ENDIAN__ 1
+// X86_64:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// X86_64:#define __LONG_MAX__ 9223372036854775807L
+// X86_64:#define __LP64__ 1
+// X86_64:#define __MMX__ 1
+// X86_64:#define __NO_INLINE__ 1
+// X86_64:#define __NO_MATH_INLINES 1
+// X86_64:#define __POINTER_WIDTH__ 64
+// X86_64:#define __PTRDIFF_TYPE__ long int
+// X86_64:#define __REGISTER_PREFIX__
+// X86_64:#define __SCHAR_MAX__ 127
+// X86_64:#define __SHRT_MAX__ 32767
+// X86_64:#define __SIZE_TYPE__ long unsigned int
+// X86_64:#define __SSE2_MATH__ 1
+// X86_64:#define __SSE2__ 1
+// X86_64:#define __SSE_MATH__ 1
+// X86_64:#define __SSE__ 1
+// X86_64:#define __UINTMAX_TYPE__ long unsigned int
+// X86_64:#define __USER_LABEL_PREFIX__ _
+// X86_64:#define __WCHAR_MAX__ 2147483647
+// X86_64:#define __WCHAR_TYPE__ int
+// X86_64:#define __WINT_TYPE__ int
+// X86_64:#define __amd64 1
+// X86_64:#define __amd64__ 1
+// X86_64:#define __nocona 1
+// X86_64:#define __nocona__ 1
+// X86_64:#define __tune_nocona__ 1
+// X86_64:#define __x86_64 1
+// X86_64:#define __x86_64__ 1
+//
+// RUN: true
diff --git a/test/Preprocessor/line-directive.c b/test/Preprocessor/line-directive.c
index ed9a6c4..4ebf95b 100644
--- a/test/Preprocessor/line-directive.c
+++ b/test/Preprocessor/line-directive.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify -pedantic %s &&
+// RUN: clang-cc -fsyntax-only -verify -pedantic -fms-extensions=0 %s &&
// RUN: clang-cc -E %s 2>&1 | grep 'blonk.c:92:2: error: #error ABC' &&
// RUN: clang-cc -E %s 2>&1 | grep 'blonk.c:93:2: error: #error DEF'
diff --git a/test/Preprocessor/macro_disable3.c b/test/Preprocessor/macro_disable3.c
index 011de3b..d4a5664 100644
--- a/test/Preprocessor/macro_disable3.c
+++ b/test/Preprocessor/macro_disable3.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -E | grep -F 'f(2 * (f(2 * (z[0]))));'
+// RUN: clang-cc %s -E | FileCheck -strict-whitespace %s
// Check for C99 6.10.3.4p2.
#define f(a) f(x * (a))
@@ -6,3 +6,5 @@
#define z z[0]
f(f(z));
+// CHECK: f(2 * (f(2 * (z[0]))));
+
diff --git a/test/Preprocessor/macro_paste_mscomment.c b/test/Preprocessor/macro_paste_mscomment.c
index d6ead91..ecd0b9d 100644
--- a/test/Preprocessor/macro_paste_mscomment.c
+++ b/test/Preprocessor/macro_paste_mscomment.c
@@ -1,5 +1,4 @@
-// RUN: clang-cc -P -E -fms-extensions %s | sed '/^#.\+/d' | tr -d '\n' > %t &&
-// RUN: grep '^int foo;int bar;int baz;$' %t | count 1
+// RUN: clang-cc -P -E -fms-extensions %s | FileCheck -strict-whitespace %s
// This horrible stuff should preprocess into (other than whitespace):
// int foo;
// int bar;
@@ -7,14 +6,21 @@
int foo;
+// CHECK: int foo;
+
#define comment /##/ dead tokens live here
comment This is stupidity
int bar;
+// CHECK: int bar;
+
#define nested(x) int x comment cute little dead tokens...
nested(baz) rise of the dead tokens
;
+// CHECK: int baz
+// CHECK: ;
+
diff --git a/test/Preprocessor/macro_rescan_varargs.c b/test/Preprocessor/macro_rescan_varargs.c
index ed1056a..8a3ad15 100644
--- a/test/Preprocessor/macro_rescan_varargs.c
+++ b/test/Preprocessor/macro_rescan_varargs.c
@@ -1,5 +1,5 @@
-// RUN: clang-cc -E %s | grep -F "1: F, (, 'a', 'b', );" &&
-// RUN: clang-cc -E %s | grep -F "2: 'a' + 'b';"
+// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s
+
#define LPAREN (
#define RPAREN )
#define F(x, y) x + y
@@ -8,3 +8,6 @@
1: ELLIP_FUNC(F, LPAREN, 'a', 'b', RPAREN); /* 1st invocation */
2: ELLIP_FUNC(F LPAREN 'a', 'b' RPAREN); /* 2nd invocation */
+// CHECK: 1: F, (, 'a', 'b', );
+// CHECK: 2: 'a' + 'b';
+
diff --git a/test/Preprocessor/macro_rparen_scan2.c b/test/Preprocessor/macro_rparen_scan2.c
index 41748ac..c7fb9e3 100644
--- a/test/Preprocessor/macro_rparen_scan2.c
+++ b/test/Preprocessor/macro_rparen_scan2.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -E %s | grep -F 'static int glob = (1 + 1 );'
+// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s
#define R_PAREN )
@@ -6,3 +6,5 @@
static int glob = (1 + FUNC(1 R_PAREN );
+// CHECK: static int glob = (1 + 1 );
+
diff --git a/test/Preprocessor/macro_undef.c b/test/Preprocessor/macro_undef.c
new file mode 100644
index 0000000..4507cdd
--- /dev/null
+++ b/test/Preprocessor/macro_undef.c
@@ -0,0 +1,4 @@
+// RUN: clang-cc -dM -undef -Dfoo=1 -E %s | FileCheck %s
+
+// CHECK-NOT: #define __clang__
+// CHECK: #define foo 1
diff --git a/test/Preprocessor/output_paste_avoid.c b/test/Preprocessor/output_paste_avoid.c
index ff8afc3..200ced9 100644
--- a/test/Preprocessor/output_paste_avoid.c
+++ b/test/Preprocessor/output_paste_avoid.c
@@ -1,23 +1,26 @@
-// RUN: clang-cc -E %s -o %t &&
-// This should print as ".. ." to avoid turning into ...
-// RUN: grep -F 'A: . . .' %t &&
+// RUN: clang-cc -E %s -o - | FileCheck -strict-whitespace %s
+
+
#define y(a) ..a
A: y(.)
+// This should print as ".. ." to avoid turning into ...
+// CHECK: A: . . .
+
-// RUN: grep -F 'C: .. .' %t &&
#define DOT .
C: ..DOT
+// CHECK: C: .. .
-// RUN: grep -F 'D: + + - - + + = = =' %t &&
#define PLUS +
#define EMPTY
#define f(x) =x=
D: +PLUS -EMPTY- PLUS+ f(=)
+// CHECK: D: + + - - + + = = =
-// RUN: grep -F 'E: L "str"' %t
-// Should expand to L "str" not L"str"
#define test(x) L#x
E: test(str)
+// Should expand to L "str" not L"str"
+// CHECK: E: L "str"
diff --git a/test/Preprocessor/stdint.c b/test/Preprocessor/stdint.c
new file mode 100644
index 0000000..e292bd3
--- /dev/null
+++ b/test/Preprocessor/stdint.c
@@ -0,0 +1,1244 @@
+// RUN: clang-cc -E -ffreestanding -triple=arm-none-none %s | FileCheck -check-prefix ARM %s &&
+//
+// ARM:typedef signed char int8_t;
+// ARM:typedef short int16_t;
+// ARM:typedef int int32_t;
+// ARM:typedef long long int int64_t;
+//
+// ARM:typedef unsigned char uint8_t;
+// ARM:typedef int8_t int_least8_t;
+// ARM:typedef uint8_t uint_least8_t;
+// ARM:typedef int8_t int_fast8_t;
+// ARM:typedef uint8_t uint_fast8_t;
+//
+// ARM:typedef unsigned short uint16_t;
+// ARM:typedef int16_t int_least16_t;
+// ARM:typedef uint16_t uint_least16_t;
+// ARM:typedef int16_t int_fast16_t;
+// ARM:typedef uint16_t uint_fast16_t;
+//
+// ARM:typedef unsigned int uint32_t;
+// ARM:typedef int32_t int_least32_t;
+// ARM:typedef uint32_t uint_least32_t;
+// ARM:typedef int32_t int_fast32_t;
+// ARM:typedef uint32_t uint_fast32_t;
+//
+// ARM:typedef unsigned long long int uint64_t;
+// ARM:typedef int64_t int_least64_t;
+// ARM:typedef uint64_t uint_least64_t;
+// ARM:typedef int64_t int_fast64_t;
+// ARM:typedef uint64_t uint_fast64_t;
+//
+// ARM:typedef long int intptr_t;
+// ARM:typedef unsigned long int uintptr_t;
+//
+// ARM:typedef long long int intmax_t;
+// ARM:typedef long long unsigned int uintmax_t;
+//
+// ARM:INT8_MAX_ 127
+// ARM:INT8_MIN_ (-128)
+// ARM:UINT8_MAX_ 255
+// ARM:INT_LEAST8_MIN_ (-128)
+// ARM:INT_LEAST8_MAX_ 127
+// ARM:UINT_LEAST8_MAX_ 255
+// ARM:INT_FAST8_MIN_ (-128)
+// ARM:INT_FAST8_MAX_ 127
+// ARM:UINT_FAST8_MAX_ 255
+//
+// ARM:INT16_MAX_ 32767
+// ARM:INT16_MIN_ (-32768)
+// ARM:UINT16_MAX_ 65535
+// ARM:INT_LEAST16_MIN_ (-32768)
+// ARM:INT_LEAST16_MAX_ 32767
+// ARM:UINT_LEAST16_MAX_ 65535
+// ARM:INT_FAST16_MIN_ (-32768)
+// ARM:INT_FAST16_MAX_ 32767
+// ARM:UINT_FAST16_MAX_ 65535
+//
+// ARM:INT32_MAX_ 2147483647
+// ARM:INT32_MIN_ (-2147483647 -1)
+// ARM:UINT32_MAX_ 4294967295U
+// ARM:INT_LEAST32_MIN_ (-2147483647 -1)
+// ARM:INT_LEAST32_MAX_ 2147483647
+// ARM:UINT_LEAST32_MAX_ 4294967295U
+// ARM:INT_FAST32_MIN_ (-2147483647 -1)
+// ARM:INT_FAST32_MAX_ 2147483647
+// ARM:UINT_FAST32_MAX_ 4294967295U
+//
+// ARM:INT64_MAX_ 9223372036854775807LL
+// ARM:INT64_MIN_ (-9223372036854775807LL -1)
+// ARM:UINT64_MAX_ 18446744073709551615ULL
+// ARM:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
+// ARM:INT_LEAST64_MAX_ 9223372036854775807LL
+// ARM:UINT_LEAST64_MAX_ 18446744073709551615ULL
+// ARM:INT_FAST64_MIN_ (-9223372036854775807LL -1)
+// ARM:INT_FAST64_MAX_ 9223372036854775807LL
+// ARM:UINT_FAST64_MAX_ 18446744073709551615ULL
+//
+// ARM:INTPTR_MIN_ (-2147483647 -1)
+// ARM:INTPTR_MAX_ 2147483647
+// ARM:UINTPTR_MAX_ 4294967295U
+// ARM:PTRDIFF_MIN_ (-2147483647 -1)
+// ARM:PTRDIFF_MAX_ 2147483647
+// ARM:SIZE_MAX_ 4294967295U
+//
+// ARM:INTMAX_MIN_ (-9223372036854775807LL -1)
+// ARM:INTMAX_MAX_ 9223372036854775807LL
+// ARM:UINTMAX_MAX_ (9223372036854775807LL*2ULL +1ULL)
+//
+// ARM:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// ARM:SIG_ATOMIC_MAX_ 2147483647
+// ARM:WINT_MIN_ (-2147483647 -1)
+// ARM:WINT_MAX_ 2147483647
+//
+// ARM:WCHAR_MAX_ 2147483647
+// ARM:WCHAR_MIN_ (-2147483647 -1)
+//
+// ARM:INT8_C_(0) (0)
+// ARM:UINT8_C_(0) (0U)
+// ARM:INT16_C_(0) (0)
+// ARM:UINT16_C_(0) (0U)
+// ARM:INT32_C_(0) (0)
+// ARM:UINT32_C_(0) (0U)
+// ARM:INT64_C_(0) (0LL)
+// ARM:UINT64_C_(0) (0ULL)
+//
+// ARM:INTMAX_C_(0) (0LL)
+// ARM:UINTMAX_C_(0) (0ULL)
+//
+//
+// RUN: clang-cc -E -ffreestanding -triple=bfin-none-none %s | FileCheck -check-prefix BFIN %s &&
+//
+// BFIN:typedef signed char int8_t;
+// BFIN:typedef short int16_t;
+// BFIN:typedef int int32_t;
+//
+// BFIN:typedef long long int int64_t;
+//
+// BFIN:typedef unsigned char uint8_t;
+// BFIN:typedef int8_t int_least8_t;
+// BFIN:typedef uint8_t uint_least8_t;
+// BFIN:typedef int8_t int_fast8_t;
+// BFIN:typedef uint8_t uint_fast8_t;
+//
+// BFIN:typedef unsigned short uint16_t;
+// BFIN:typedef int16_t int_least16_t;
+// BFIN:typedef uint16_t uint_least16_t;
+// BFIN:typedef int16_t int_fast16_t;
+// BFIN:typedef uint16_t uint_fast16_t;
+//
+// BFIN:typedef unsigned int uint32_t;
+// BFIN:typedef int32_t int_least32_t;
+// BFIN:typedef uint32_t uint_least32_t;
+// BFIN:typedef int32_t int_fast32_t;
+// BFIN:typedef uint32_t uint_fast32_t;
+//
+// BFIN:typedef unsigned long long int uint64_t;
+// BFIN:typedef int64_t int_least64_t;
+// BFIN:typedef uint64_t uint_least64_t;
+// BFIN:typedef int64_t int_fast64_t;
+// BFIN:typedef uint64_t uint_fast64_t;
+//
+// BFIN:typedef long int intptr_t;
+// BFIN:typedef unsigned long int uintptr_t;
+//
+// BFIN:typedef long long int intmax_t;
+// BFIN:typedef long long unsigned int uintmax_t;
+//
+// BFIN:INT8_MAX_ 127
+// BFIN:INT8_MIN_ (-128)
+// BFIN:UINT8_MAX_ 255
+// BFIN:INT_LEAST8_MIN_ (-128)
+// BFIN:INT_LEAST8_MAX_ 127
+// BFIN:UINT_LEAST8_MAX_ 255
+// BFIN:INT_FAST8_MIN_ (-128)
+// BFIN:INT_FAST8_MAX_ 127
+// BFIN:UINT_FAST8_MAX_ 255
+//
+// BFIN:INT16_MAX_ 32767
+// BFIN:INT16_MIN_ (-32768)
+// BFIN:UINT16_MAX_ 65535
+// BFIN:INT_LEAST16_MIN_ (-32768)
+// BFIN:INT_LEAST16_MAX_ 32767
+// BFIN:UINT_LEAST16_MAX_ 65535
+// BFIN:INT_FAST16_MIN_ (-32768)
+// BFIN:INT_FAST16_MAX_ 32767
+// BFIN:UINT_FAST16_MAX_ 65535
+//
+// BFIN:INT32_MAX_ 2147483647
+// BFIN:INT32_MIN_ (-2147483647 -1)
+// BFIN:UINT32_MAX_ 4294967295U
+// BFIN:INT_LEAST32_MIN_ (-2147483647 -1)
+// BFIN:INT_LEAST32_MAX_ 2147483647
+// BFIN:UINT_LEAST32_MAX_ 4294967295U
+// BFIN:INT_FAST32_MIN_ (-2147483647 -1)
+// BFIN:INT_FAST32_MAX_ 2147483647
+// BFIN:UINT_FAST32_MAX_ 4294967295U
+//
+// BFIN:INT64_MAX_ 9223372036854775807LL
+// BFIN:INT64_MIN_ (-9223372036854775807LL -1)
+// BFIN:UINT64_MAX_ 18446744073709551615ULL
+// BFIN:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
+// BFIN:INT_LEAST64_MAX_ 9223372036854775807LL
+// BFIN:UINT_LEAST64_MAX_ 18446744073709551615ULL
+// BFIN:INT_FAST64_MIN_ (-9223372036854775807LL -1)
+// BFIN:INT_FAST64_MAX_ 9223372036854775807LL
+// BFIN:UINT_FAST64_MAX_ 18446744073709551615ULL
+//
+// BFIN:INTPTR_MIN_ (-2147483647 -1)
+// BFIN:INTPTR_MAX_ 2147483647
+// BFIN:UINTPTR_MAX_ 4294967295U
+// BFIN:PTRDIFF_MIN_ (-2147483647 -1)
+// BFIN:PTRDIFF_MAX_ 2147483647
+// BFIN:SIZE_MAX_ 4294967295U
+//
+// BFIN:INTMAX_MIN_ (-9223372036854775807LL -1)
+// BFIN:INTMAX_MAX_ 9223372036854775807LL
+// BFIN:UINTMAX_MAX_ (9223372036854775807LL*2ULL +1ULL)
+//
+// BFIN:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// BFIN:SIG_ATOMIC_MAX_ 2147483647
+// BFIN:WINT_MIN_ (-2147483647 -1)
+// BFIN:WINT_MAX_ 2147483647
+//
+// BFIN:WCHAR_MAX_ 2147483647
+// BFIN:WCHAR_MIN_ (-2147483647 -1)
+//
+// BFIN:INT8_C_(0) (0)
+// BFIN:UINT8_C_(0) (0U)
+// BFIN:INT16_C_(0) (0)
+// BFIN:UINT16_C_(0) (0U)
+// BFIN:INT32_C_(0) (0)
+// BFIN:UINT32_C_(0) (0U)
+// BFIN:INT64_C_(0) (0LL)
+// BFIN:UINT64_C_(0) (0ULL)
+//
+// BFIN:INTMAX_C_(0) (0LL)
+// BFIN:UINTMAX_C_(0) (0ULL)
+//
+//
+// RUN: clang-cc -E -ffreestanding -triple=i386-none-none %s | FileCheck -check-prefix I386 %s &&
+//
+// I386:typedef signed char int8_t;
+// I386:typedef short int16_t;
+// I386:typedef int int32_t;
+// I386:typedef long long int int64_t;
+//
+// I386:typedef unsigned char uint8_t;
+// I386:typedef int8_t int_least8_t;
+// I386:typedef uint8_t uint_least8_t;
+// I386:typedef int8_t int_fast8_t;
+// I386:typedef uint8_t uint_fast8_t;
+//
+// I386:typedef unsigned short uint16_t;
+// I386:typedef int16_t int_least16_t;
+// I386:typedef uint16_t uint_least16_t;
+// I386:typedef int16_t int_fast16_t;
+// I386:typedef uint16_t uint_fast16_t;
+//
+// I386:typedef unsigned int uint32_t;
+// I386:typedef int32_t int_least32_t;
+// I386:typedef uint32_t uint_least32_t;
+// I386:typedef int32_t int_fast32_t;
+// I386:typedef uint32_t uint_fast32_t;
+//
+// I386:typedef unsigned long long int uint64_t;
+// I386:typedef int64_t int_least64_t;
+// I386:typedef uint64_t uint_least64_t;
+// I386:typedef int64_t int_fast64_t;
+// I386:typedef uint64_t uint_fast64_t;
+//
+// I386:typedef int intptr_t;
+// I386:typedef unsigned int uintptr_t;
+//
+// I386:typedef long long int intmax_t;
+// I386:typedef long long unsigned int uintmax_t;
+//
+// I386:INT8_MAX_ 127
+// I386:INT8_MIN_ (-128)
+// I386:UINT8_MAX_ 255
+// I386:INT_LEAST8_MIN_ (-128)
+// I386:INT_LEAST8_MAX_ 127
+// I386:UINT_LEAST8_MAX_ 255
+// I386:INT_FAST8_MIN_ (-128)
+// I386:INT_FAST8_MAX_ 127
+// I386:UINT_FAST8_MAX_ 255
+//
+// I386:INT16_MAX_ 32767
+// I386:INT16_MIN_ (-32768)
+// I386:UINT16_MAX_ 65535
+// I386:INT_LEAST16_MIN_ (-32768)
+// I386:INT_LEAST16_MAX_ 32767
+// I386:UINT_LEAST16_MAX_ 65535
+// I386:INT_FAST16_MIN_ (-32768)
+// I386:INT_FAST16_MAX_ 32767
+// I386:UINT_FAST16_MAX_ 65535
+//
+// I386:INT32_MAX_ 2147483647
+// I386:INT32_MIN_ (-2147483647 -1)
+// I386:UINT32_MAX_ 4294967295U
+// I386:INT_LEAST32_MIN_ (-2147483647 -1)
+// I386:INT_LEAST32_MAX_ 2147483647
+// I386:UINT_LEAST32_MAX_ 4294967295U
+// I386:INT_FAST32_MIN_ (-2147483647 -1)
+// I386:INT_FAST32_MAX_ 2147483647
+// I386:UINT_FAST32_MAX_ 4294967295U
+//
+// I386:INT64_MAX_ 9223372036854775807LL
+// I386:INT64_MIN_ (-9223372036854775807LL -1)
+// I386:UINT64_MAX_ 18446744073709551615ULL
+// I386:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
+// I386:INT_LEAST64_MAX_ 9223372036854775807LL
+// I386:UINT_LEAST64_MAX_ 18446744073709551615ULL
+// I386:INT_FAST64_MIN_ (-9223372036854775807LL -1)
+// I386:INT_FAST64_MAX_ 9223372036854775807LL
+// I386:UINT_FAST64_MAX_ 18446744073709551615ULL
+//
+// I386:INTPTR_MIN_ (-2147483647 -1)
+// I386:INTPTR_MAX_ 2147483647
+// I386:UINTPTR_MAX_ 4294967295U
+// I386:PTRDIFF_MIN_ (-2147483647 -1)
+// I386:PTRDIFF_MAX_ 2147483647
+// I386:SIZE_MAX_ 4294967295U
+//
+// I386:INTMAX_MIN_ (-9223372036854775807LL -1)
+// I386:INTMAX_MAX_ 9223372036854775807LL
+// I386:UINTMAX_MAX_ (9223372036854775807LL*2ULL +1ULL)
+//
+// I386:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// I386:SIG_ATOMIC_MAX_ 2147483647
+// I386:WINT_MIN_ (-2147483647 -1)
+// I386:WINT_MAX_ 2147483647
+//
+// I386:WCHAR_MAX_ 2147483647
+// I386:WCHAR_MIN_ (-2147483647 -1)
+//
+// I386:INT8_C_(0) (0)
+// I386:UINT8_C_(0) (0U)
+// I386:INT16_C_(0) (0)
+// I386:UINT16_C_(0) (0U)
+// I386:INT32_C_(0) (0)
+// I386:UINT32_C_(0) (0U)
+// I386:INT64_C_(0) (0LL)
+// I386:UINT64_C_(0) (0ULL)
+//
+// I386:INTMAX_C_(0) (0LL)
+// I386:UINTMAX_C_(0) (0ULL)
+//
+// RUN: clang-cc -E -ffreestanding -triple=msp430-none-none %s | FileCheck -check-prefix MSP430 %s &&
+//
+// MSP430:typedef signed char int8_t;
+// MSP430:typedef short int16_t;
+// MSP430:typedef long long int32_t;
+//
+// MSP430:typedef unsigned char uint8_t;
+// MSP430:typedef int8_t int_least8_t;
+// MSP430:typedef uint8_t uint_least8_t;
+// MSP430:typedef int8_t int_fast8_t;
+// MSP430:typedef uint8_t uint_fast8_t;
+//
+// MSP430:typedef unsigned short uint16_t;
+// MSP430:typedef int16_t int_least16_t;
+// MSP430:typedef uint16_t uint_least16_t;
+// MSP430:typedef int16_t int_fast16_t;
+// MSP430:typedef uint16_t uint_fast16_t;
+//
+// MSP430:typedef unsigned long long uint32_t;
+// MSP430:typedef int32_t int_least32_t;
+// MSP430:typedef uint32_t uint_least32_t;
+// MSP430:typedef int32_t int_fast32_t;
+// MSP430:typedef uint32_t uint_fast32_t;
+//
+// MSP430:typedef short intptr_t;
+// MSP430:typedef unsigned short uintptr_t;
+//
+// MSP430:typedef long int intmax_t;
+// MSP430:typedef long unsigned int uintmax_t;
+//
+// MSP430:INT8_MAX_ 127
+// MSP430:INT8_MIN_ (-128)
+// MSP430:UINT8_MAX_ 255
+// MSP430:INT_LEAST8_MIN_ (-128)
+// MSP430:INT_LEAST8_MAX_ 127
+// MSP430:UINT_LEAST8_MAX_ 255
+// MSP430:INT_FAST8_MIN_ (-128)
+// MSP430:INT_FAST8_MAX_ 127
+// MSP430:UINT_FAST8_MAX_ 255
+//
+// MSP430:INT16_MAX_ 32767
+// MSP430:INT16_MIN_ (-32768)
+// MSP430:UINT16_MAX_ 65535
+// MSP430:INT_LEAST16_MIN_ (-32768)
+// MSP430:INT_LEAST16_MAX_ 32767
+// MSP430:UINT_LEAST16_MAX_ 65535
+// MSP430:INT_FAST16_MIN_ (-32768)
+// MSP430:INT_FAST16_MAX_ 32767
+// MSP430:UINT_FAST16_MAX_ 65535
+//
+// MSP430:INT32_MAX_ 2147483647
+// MSP430:INT32_MIN_ (-2147483647 -1)
+// MSP430:UINT32_MAX_ 4294967295U
+// MSP430:INT_LEAST32_MIN_ (-2147483647 -1)
+// MSP430:INT_LEAST32_MAX_ 2147483647
+// MSP430:UINT_LEAST32_MAX_ 4294967295U
+// MSP430:INT_FAST32_MIN_ (-2147483647 -1)
+// MSP430:INT_FAST32_MAX_ 2147483647
+// MSP430:UINT_FAST32_MAX_ 4294967295U
+//
+// MSP430:INT64_MAX_ INT64_MAX
+// MSP430:INT64_MIN_ INT64_MIN
+// MSP430:UINT64_MAX_ UINT64_MAX
+// MSP430:INT_LEAST64_MIN_ INT_LEAST64_MIN
+// MSP430:INT_LEAST64_MAX_ INT_LEAST64_MAX
+// MSP430:UINT_LEAST64_MAX_ UINT_LEAST64_MAX
+// MSP430:INT_FAST64_MIN_ INT_FAST64_MIN
+// MSP430:INT_FAST64_MAX_ INT_FAST64_MAX
+// MSP430:UINT_FAST64_MAX_ UINT_FAST64_MAX
+//
+// MSP430:INTPTR_MIN_ (-32768)
+// MSP430:INTPTR_MAX_ 32767
+// MSP430:UINTPTR_MAX_ 65535
+// MSP430:PTRDIFF_MIN_ (-32768)
+// MSP430:PTRDIFF_MAX_ 32767
+// MSP430:SIZE_MAX_ 65535
+//
+// MSP430:INTMAX_MIN_ (-2147483647L -1)
+// MSP430:INTMAX_MAX_ 2147483647L
+// MSP430:UINTMAX_MAX_ (2147483647L*2ULL +1ULL)
+//
+// MSP430:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// MSP430:SIG_ATOMIC_MAX_ 2147483647
+// MSP430:WINT_MIN_ (-2147483647 -1)
+// MSP430:WINT_MAX_ 2147483647
+//
+// MSP430:WCHAR_MAX_ 2147483647
+// MSP430:WCHAR_MIN_ (-2147483647 -1)
+//
+// MSP430:INT8_C_(0) (0)
+// MSP430:UINT8_C_(0) (0U)
+// MSP430:INT16_C_(0) (0)
+// MSP430:UINT16_C_(0) (0U)
+// MSP430:INT32_C_(0) (0)
+// MSP430:UINT32_C_(0) (0U)
+// MSP430:INT64_C_(0) INT64_C(0)
+// MSP430:UINT64_C_(0) UINT64_C(0)
+//
+// MSP430:INTMAX_C_(0) (0LL)
+// MSP430:UINTMAX_C_(0) (0ULL)
+//
+// RUN: clang-cc -E -ffreestanding -triple=pic16-none-none %s | FileCheck -check-prefix PIC16 %s &&
+//
+// PIC16:typedef signed char int8_t;
+// PIC16:typedef short int16_t;
+// PIC16:typedef long long int32_t;
+//
+// PIC16:typedef unsigned char uint8_t;
+// PIC16:typedef int8_t int_least8_t;
+// PIC16:typedef uint8_t uint_least8_t;
+// PIC16:typedef int8_t int_fast8_t;
+// PIC16:typedef uint8_t uint_fast8_t;
+//
+// PIC16:typedef unsigned short uint16_t;
+// PIC16:typedef int16_t int_least16_t;
+// PIC16:typedef uint16_t uint_least16_t;
+// PIC16:typedef int16_t int_fast16_t;
+// PIC16:typedef uint16_t uint_fast16_t;
+//
+// PIC16:typedef unsigned long long uint32_t;
+// PIC16:typedef int32_t int_least32_t;
+// PIC16:typedef uint32_t uint_least32_t;
+// PIC16:typedef int32_t int_fast32_t;
+// PIC16:typedef uint32_t uint_fast32_t;
+//
+// PIC16:typedef short intptr_t;
+// PIC16:typedef unsigned short uintptr_t;
+//
+// PIC16:typedef long int intmax_t;
+// PIC16:typedef long unsigned int uintmax_t;
+//
+// PIC16:INT8_MAX_ 127
+// PIC16:INT8_MIN_ (-128)
+// PIC16:UINT8_MAX_ 255
+// PIC16:INT_LEAST8_MIN_ (-128)
+// PIC16:INT_LEAST8_MAX_ 127
+// PIC16:UINT_LEAST8_MAX_ 255
+// PIC16:INT_FAST8_MIN_ (-128)
+// PIC16:INT_FAST8_MAX_ 127
+// PIC16:UINT_FAST8_MAX_ 255
+//
+// PIC16:INT16_MAX_ 32767
+// PIC16:INT16_MIN_ (-32768)
+// PIC16:UINT16_MAX_ 65535
+// PIC16:INT_LEAST16_MIN_ (-32768)
+// PIC16:INT_LEAST16_MAX_ 32767
+// PIC16:UINT_LEAST16_MAX_ 65535
+// PIC16:INT_FAST16_MIN_ (-32768)
+// PIC16:INT_FAST16_MAX_ 32767
+// PIC16:UINT_FAST16_MAX_ 65535
+//
+// PIC16:INT32_MAX_ 2147483647
+// PIC16:INT32_MIN_ (-2147483647 -1)
+// PIC16:UINT32_MAX_ 4294967295U
+// PIC16:INT_LEAST32_MIN_ (-2147483647 -1)
+// PIC16:INT_LEAST32_MAX_ 2147483647
+// PIC16:UINT_LEAST32_MAX_ 4294967295U
+// PIC16:INT_FAST32_MIN_ (-2147483647 -1)
+// PIC16:INT_FAST32_MAX_ 2147483647
+// PIC16:UINT_FAST32_MAX_ 4294967295U
+//
+// PIC16:INT64_MAX_ INT64_MAX
+// PIC16:INT64_MIN_ INT64_MIN
+// PIC16:UINT64_MAX_ UINT64_MAX
+// PIC16:INT_LEAST64_MIN_ INT_LEAST64_MIN
+// PIC16:INT_LEAST64_MAX_ INT_LEAST64_MAX
+// PIC16:UINT_LEAST64_MAX_ UINT_LEAST64_MAX
+// PIC16:INT_FAST64_MIN_ INT_FAST64_MIN
+// PIC16:INT_FAST64_MAX_ INT_FAST64_MAX
+// PIC16:UINT_FAST64_MAX_ UINT_FAST64_MAX
+//
+// PIC16:INTPTR_MIN_ (-32768)
+// PIC16:INTPTR_MAX_ 32767
+// PIC16:UINTPTR_MAX_ 65535
+// PIC16:PTRDIFF_MIN_ (-32768)
+// PIC16:PTRDIFF_MAX_ 32767
+// PIC16:SIZE_MAX_ 65535
+//
+// PIC16:INTMAX_MIN_ (-2147483647L -1)
+// PIC16:INTMAX_MAX_ 2147483647L
+// PIC16:UINTMAX_MAX_ (2147483647L*2ULL +1ULL)
+//
+// PIC16:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// PIC16:SIG_ATOMIC_MAX_ 2147483647
+// PIC16:WINT_MIN_ (-2147483647 -1)
+// PIC16:WINT_MAX_ 2147483647
+//
+// PIC16:WCHAR_MAX_ 2147483647
+// PIC16:WCHAR_MIN_ (-2147483647 -1)
+//
+// PIC16:INT8_C_(0) (0)
+// PIC16:UINT8_C_(0) (0U)
+// PIC16:INT16_C_(0) (0)
+// PIC16:UINT16_C_(0) (0U)
+// PIC16:INT32_C_(0) (0)
+// PIC16:UINT32_C_(0) (0U)
+// PIC16:INT64_C_(0) INT64_C(0)
+// PIC16:UINT64_C_(0) UINT64_C(0)
+//
+// PIC16:INTMAX_C_(0) (0LL)
+// PIC16:UINTMAX_C_(0) (0ULL)
+//
+// RUN: clang-cc -E -ffreestanding -triple=powerpc64-none-none %s | FileCheck -check-prefix PPC64 %s &&
+//
+// PPC64:typedef signed char int8_t;
+// PPC64:typedef short int16_t;
+// PPC64:typedef int int32_t;
+// PPC64:typedef long int int64_t;
+//
+// PPC64:typedef unsigned char uint8_t;
+// PPC64:typedef int8_t int_least8_t;
+// PPC64:typedef uint8_t uint_least8_t;
+// PPC64:typedef int8_t int_fast8_t;
+// PPC64:typedef uint8_t uint_fast8_t;
+//
+// PPC64:typedef unsigned short uint16_t;
+// PPC64:typedef int16_t int_least16_t;
+// PPC64:typedef uint16_t uint_least16_t;
+// PPC64:typedef int16_t int_fast16_t;
+// PPC64:typedef uint16_t uint_fast16_t;
+//
+// PPC64:typedef unsigned int uint32_t;
+// PPC64:typedef int32_t int_least32_t;
+// PPC64:typedef uint32_t uint_least32_t;
+// PPC64:typedef int32_t int_fast32_t;
+// PPC64:typedef uint32_t uint_fast32_t;
+//
+// PPC64:typedef unsigned long int uint64_t;
+// PPC64:typedef int64_t int_least64_t;
+// PPC64:typedef uint64_t uint_least64_t;
+// PPC64:typedef int64_t int_fast64_t;
+// PPC64:typedef uint64_t uint_fast64_t;
+//
+// PPC64:typedef long int intptr_t;
+// PPC64:typedef unsigned long int uintptr_t;
+//
+// PPC64:typedef long int intmax_t;
+// PPC64:typedef long unsigned int uintmax_t;
+//
+// PPC64:INT8_MAX_ 127
+// PPC64:INT8_MIN_ (-128)
+// PPC64:UINT8_MAX_ 255
+// PPC64:INT_LEAST8_MIN_ (-128)
+// PPC64:INT_LEAST8_MAX_ 127
+// PPC64:UINT_LEAST8_MAX_ 255
+// PPC64:INT_FAST8_MIN_ (-128)
+// PPC64:INT_FAST8_MAX_ 127
+// PPC64:UINT_FAST8_MAX_ 255
+//
+// PPC64:INT16_MAX_ 32767
+// PPC64:INT16_MIN_ (-32768)
+// PPC64:UINT16_MAX_ 65535
+// PPC64:INT_LEAST16_MIN_ (-32768)
+// PPC64:INT_LEAST16_MAX_ 32767
+// PPC64:UINT_LEAST16_MAX_ 65535
+// PPC64:INT_FAST16_MIN_ (-32768)
+// PPC64:INT_FAST16_MAX_ 32767
+// PPC64:UINT_FAST16_MAX_ 65535
+//
+// PPC64:INT32_MAX_ 2147483647
+// PPC64:INT32_MIN_ (-2147483647 -1)
+// PPC64:UINT32_MAX_ 4294967295U
+// PPC64:INT_LEAST32_MIN_ (-2147483647 -1)
+// PPC64:INT_LEAST32_MAX_ 2147483647
+// PPC64:UINT_LEAST32_MAX_ 4294967295U
+// PPC64:INT_FAST32_MIN_ (-2147483647 -1)
+// PPC64:INT_FAST32_MAX_ 2147483647
+// PPC64:UINT_FAST32_MAX_ 4294967295U
+//
+// PPC64:INT64_MAX_ 9223372036854775807LL
+// PPC64:INT64_MIN_ (-9223372036854775807LL -1)
+// PPC64:UINT64_MAX_ 18446744073709551615ULL
+// PPC64:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
+// PPC64:INT_LEAST64_MAX_ 9223372036854775807LL
+// PPC64:UINT_LEAST64_MAX_ 18446744073709551615ULL
+// PPC64:INT_FAST64_MIN_ (-9223372036854775807LL -1)
+// PPC64:INT_FAST64_MAX_ 9223372036854775807LL
+// PPC64:UINT_FAST64_MAX_ 18446744073709551615ULL
+//
+// PPC64:INTPTR_MIN_ (-9223372036854775807LL -1)
+// PPC64:INTPTR_MAX_ 9223372036854775807LL
+// PPC64:UINTPTR_MAX_ 18446744073709551615ULL
+// PPC64:PTRDIFF_MIN_ (-9223372036854775807LL -1)
+// PPC64:PTRDIFF_MAX_ 9223372036854775807LL
+// PPC64:SIZE_MAX_ 18446744073709551615ULL
+//
+// PPC64:INTMAX_MIN_ (-9223372036854775807L -1)
+// PPC64:INTMAX_MAX_ 9223372036854775807L
+// PPC64:UINTMAX_MAX_ (9223372036854775807L*2ULL +1ULL)
+//
+// PPC64:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// PPC64:SIG_ATOMIC_MAX_ 2147483647
+// PPC64:WINT_MIN_ (-2147483647 -1)
+// PPC64:WINT_MAX_ 2147483647
+//
+// PPC64:WCHAR_MAX_ 2147483647
+// PPC64:WCHAR_MIN_ (-2147483647 -1)
+//
+// PPC64:INT8_C_(0) (0)
+// PPC64:UINT8_C_(0) (0U)
+// PPC64:INT16_C_(0) (0)
+// PPC64:UINT16_C_(0) (0U)
+// PPC64:INT32_C_(0) (0)
+// PPC64:UINT32_C_(0) (0U)
+// PPC64:INT64_C_(0) (0LL)
+// PPC64:UINT64_C_(0) (0ULL)
+//
+// PPC64:INTMAX_C_(0) (0LL)
+// PPC64:UINTMAX_C_(0) (0ULL)
+//
+// RUN: clang-cc -E -ffreestanding -triple=powerpc-none-none %s | FileCheck -check-prefix PPC %s &&
+//
+// PPC:typedef signed char int8_t;
+// PPC:typedef short int16_t;
+// PPC:typedef int int32_t;
+// PPC:typedef long long int int64_t;
+//
+// PPC:typedef unsigned char uint8_t;
+// PPC:typedef int8_t int_least8_t;
+// PPC:typedef uint8_t uint_least8_t;
+// PPC:typedef int8_t int_fast8_t;
+// PPC:typedef uint8_t uint_fast8_t;
+//
+// PPC:typedef unsigned short uint16_t;
+// PPC:typedef int16_t int_least16_t;
+// PPC:typedef uint16_t uint_least16_t;
+// PPC:typedef int16_t int_fast16_t;
+// PPC:typedef uint16_t uint_fast16_t;
+//
+// PPC:typedef unsigned int uint32_t;
+// PPC:typedef int32_t int_least32_t;
+// PPC:typedef uint32_t uint_least32_t;
+// PPC:typedef int32_t int_fast32_t;
+// PPC:typedef uint32_t uint_fast32_t;
+//
+// PPC:typedef unsigned long long int uint64_t;
+// PPC:typedef int64_t int_least64_t;
+// PPC:typedef uint64_t uint_least64_t;
+// PPC:typedef int64_t int_fast64_t;
+// PPC:typedef uint64_t uint_fast64_t;
+//
+// PPC:typedef long int intptr_t;
+// PPC:typedef unsigned long int uintptr_t;
+//
+// PPC:typedef long long int intmax_t;
+// PPC:typedef long long unsigned int uintmax_t;
+//
+// PPC:INT8_MAX_ 127
+// PPC:INT8_MIN_ (-128)
+// PPC:UINT8_MAX_ 255
+// PPC:INT_LEAST8_MIN_ (-128)
+// PPC:INT_LEAST8_MAX_ 127
+// PPC:UINT_LEAST8_MAX_ 255
+// PPC:INT_FAST8_MIN_ (-128)
+// PPC:INT_FAST8_MAX_ 127
+// PPC:UINT_FAST8_MAX_ 255
+//
+// PPC:INT16_MAX_ 32767
+// PPC:INT16_MIN_ (-32768)
+// PPC:UINT16_MAX_ 65535
+// PPC:INT_LEAST16_MIN_ (-32768)
+// PPC:INT_LEAST16_MAX_ 32767
+// PPC:UINT_LEAST16_MAX_ 65535
+// PPC:INT_FAST16_MIN_ (-32768)
+// PPC:INT_FAST16_MAX_ 32767
+// PPC:UINT_FAST16_MAX_ 65535
+//
+// PPC:INT32_MAX_ 2147483647
+// PPC:INT32_MIN_ (-2147483647 -1)
+// PPC:UINT32_MAX_ 4294967295U
+// PPC:INT_LEAST32_MIN_ (-2147483647 -1)
+// PPC:INT_LEAST32_MAX_ 2147483647
+// PPC:UINT_LEAST32_MAX_ 4294967295U
+// PPC:INT_FAST32_MIN_ (-2147483647 -1)
+// PPC:INT_FAST32_MAX_ 2147483647
+// PPC:UINT_FAST32_MAX_ 4294967295U
+//
+// PPC:INT64_MAX_ 9223372036854775807LL
+// PPC:INT64_MIN_ (-9223372036854775807LL -1)
+// PPC:UINT64_MAX_ 18446744073709551615ULL
+// PPC:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
+// PPC:INT_LEAST64_MAX_ 9223372036854775807LL
+// PPC:UINT_LEAST64_MAX_ 18446744073709551615ULL
+// PPC:INT_FAST64_MIN_ (-9223372036854775807LL -1)
+// PPC:INT_FAST64_MAX_ 9223372036854775807LL
+// PPC:UINT_FAST64_MAX_ 18446744073709551615ULL
+//
+// PPC:INTPTR_MIN_ (-2147483647 -1)
+// PPC:INTPTR_MAX_ 2147483647
+// PPC:UINTPTR_MAX_ 4294967295U
+// PPC:PTRDIFF_MIN_ (-2147483647 -1)
+// PPC:PTRDIFF_MAX_ 2147483647
+// PPC:SIZE_MAX_ 4294967295U
+//
+// PPC:INTMAX_MIN_ (-9223372036854775807LL -1)
+// PPC:INTMAX_MAX_ 9223372036854775807LL
+// PPC:UINTMAX_MAX_ (9223372036854775807LL*2ULL +1ULL)
+//
+// PPC:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// PPC:SIG_ATOMIC_MAX_ 2147483647
+// PPC:WINT_MIN_ (-2147483647 -1)
+// PPC:WINT_MAX_ 2147483647
+//
+// PPC:WCHAR_MAX_ 2147483647
+// PPC:WCHAR_MIN_ (-2147483647 -1)
+//
+// PPC:INT8_C_(0) (0)
+// PPC:UINT8_C_(0) (0U)
+// PPC:INT16_C_(0) (0)
+// PPC:UINT16_C_(0) (0U)
+// PPC:INT32_C_(0) (0)
+// PPC:UINT32_C_(0) (0U)
+// PPC:INT64_C_(0) (0LL)
+// PPC:UINT64_C_(0) (0ULL)
+//
+// PPC:INTMAX_C_(0) (0LL)
+// PPC:UINTMAX_C_(0) (0ULL)
+//
+// RUN: clang-cc -E -ffreestanding -triple=s390x-none-none %s | FileCheck -check-prefix S390X %s &&
+//
+// S390X:typedef signed char int8_t;
+// S390X:typedef short int16_t;
+// S390X:typedef int int32_t;
+// S390X:typedef long long int int64_t;
+//
+// S390X:typedef unsigned char uint8_t;
+// S390X:typedef int8_t int_least8_t;
+// S390X:typedef uint8_t uint_least8_t;
+// S390X:typedef int8_t int_fast8_t;
+// S390X:typedef uint8_t uint_fast8_t;
+//
+// S390X:typedef unsigned short uint16_t;
+// S390X:typedef int16_t int_least16_t;
+// S390X:typedef uint16_t uint_least16_t;
+// S390X:typedef int16_t int_fast16_t;
+// S390X:typedef uint16_t uint_fast16_t;
+//
+// S390X:typedef unsigned int uint32_t;
+// S390X:typedef int32_t int_least32_t;
+// S390X:typedef uint32_t uint_least32_t;
+// S390X:typedef int32_t int_fast32_t;
+// S390X:typedef uint32_t uint_fast32_t;
+//
+// S390X:typedef unsigned long long int uint64_t;
+// S390X:typedef int64_t int_least64_t;
+// S390X:typedef uint64_t uint_least64_t;
+// S390X:typedef int64_t int_fast64_t;
+// S390X:typedef uint64_t uint_fast64_t;
+//
+// S390X:typedef long int intptr_t;
+// S390X:typedef unsigned long int uintptr_t;
+//
+// S390X:typedef long long int intmax_t;
+// S390X:typedef long long unsigned int uintmax_t;
+//
+// S390X:INT8_MAX_ 127
+// S390X:INT8_MIN_ (-128)
+// S390X:UINT8_MAX_ 255
+// S390X:INT_LEAST8_MIN_ (-128)
+// S390X:INT_LEAST8_MAX_ 127
+// S390X:UINT_LEAST8_MAX_ 255
+// S390X:INT_FAST8_MIN_ (-128)
+// S390X:INT_FAST8_MAX_ 127
+// S390X:UINT_FAST8_MAX_ 255
+//
+// S390X:INT16_MAX_ 32767
+// S390X:INT16_MIN_ (-32768)
+// S390X:UINT16_MAX_ 65535
+// S390X:INT_LEAST16_MIN_ (-32768)
+// S390X:INT_LEAST16_MAX_ 32767
+// S390X:UINT_LEAST16_MAX_ 65535
+// S390X:INT_FAST16_MIN_ (-32768)
+// S390X:INT_FAST16_MAX_ 32767
+// S390X:UINT_FAST16_MAX_ 65535
+//
+// S390X:INT32_MAX_ 2147483647
+// S390X:INT32_MIN_ (-2147483647 -1)
+// S390X:UINT32_MAX_ 4294967295U
+// S390X:INT_LEAST32_MIN_ (-2147483647 -1)
+// S390X:INT_LEAST32_MAX_ 2147483647
+// S390X:UINT_LEAST32_MAX_ 4294967295U
+// S390X:INT_FAST32_MIN_ (-2147483647 -1)
+// S390X:INT_FAST32_MAX_ 2147483647
+// S390X:UINT_FAST32_MAX_ 4294967295U
+//
+// S390X:INT64_MAX_ 9223372036854775807LL
+// S390X:INT64_MIN_ (-9223372036854775807LL -1)
+// S390X:UINT64_MAX_ 18446744073709551615ULL
+// S390X:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
+// S390X:INT_LEAST64_MAX_ 9223372036854775807LL
+// S390X:UINT_LEAST64_MAX_ 18446744073709551615ULL
+// S390X:INT_FAST64_MIN_ (-9223372036854775807LL -1)
+// S390X:INT_FAST64_MAX_ 9223372036854775807LL
+// S390X:UINT_FAST64_MAX_ 18446744073709551615ULL
+//
+// S390X:INTPTR_MIN_ (-9223372036854775807LL -1)
+// S390X:INTPTR_MAX_ 9223372036854775807LL
+// S390X:UINTPTR_MAX_ 18446744073709551615ULL
+// S390X:PTRDIFF_MIN_ (-9223372036854775807LL -1)
+// S390X:PTRDIFF_MAX_ 9223372036854775807LL
+// S390X:SIZE_MAX_ 18446744073709551615ULL
+//
+// S390X:INTMAX_MIN_ (-9223372036854775807LL -1)
+// S390X:INTMAX_MAX_ 9223372036854775807LL
+// S390X:UINTMAX_MAX_ (9223372036854775807LL*2ULL +1ULL)
+//
+// S390X:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// S390X:SIG_ATOMIC_MAX_ 2147483647
+// S390X:WINT_MIN_ (-2147483647 -1)
+// S390X:WINT_MAX_ 2147483647
+//
+// S390X:WCHAR_MAX_ 2147483647
+// S390X:WCHAR_MIN_ (-2147483647 -1)
+//
+// S390X:INT8_C_(0) (0)
+// S390X:UINT8_C_(0) (0U)
+// S390X:INT16_C_(0) (0)
+// S390X:UINT16_C_(0) (0U)
+// S390X:INT32_C_(0) (0)
+// S390X:UINT32_C_(0) (0U)
+// S390X:INT64_C_(0) (0LL)
+// S390X:UINT64_C_(0) (0ULL)
+//
+// S390X:INTMAX_C_(0) (0LL)
+// S390X:UINTMAX_C_(0) (0ULL)
+//
+// RUN: clang-cc -E -ffreestanding -triple=sparc-none-none %s | FileCheck -check-prefix SPARC %s &&
+//
+// SPARC:typedef signed char int8_t;
+// SPARC:typedef short int16_t;
+// SPARC:typedef int int32_t;
+// SPARC:typedef long long int int64_t;
+//
+// SPARC:typedef unsigned char uint8_t;
+// SPARC:typedef int8_t int_least8_t;
+// SPARC:typedef uint8_t uint_least8_t;
+// SPARC:typedef int8_t int_fast8_t;
+// SPARC:typedef uint8_t uint_fast8_t;
+//
+// SPARC:typedef unsigned short uint16_t;
+// SPARC:typedef int16_t int_least16_t;
+// SPARC:typedef uint16_t uint_least16_t;
+// SPARC:typedef int16_t int_fast16_t;
+// SPARC:typedef uint16_t uint_fast16_t;
+//
+// SPARC:typedef unsigned int uint32_t;
+// SPARC:typedef int32_t int_least32_t;
+// SPARC:typedef uint32_t uint_least32_t;
+// SPARC:typedef int32_t int_fast32_t;
+// SPARC:typedef uint32_t uint_fast32_t;
+//
+// SPARC:typedef unsigned long long int uint64_t;
+// SPARC:typedef int64_t int_least64_t;
+// SPARC:typedef uint64_t uint_least64_t;
+// SPARC:typedef int64_t int_fast64_t;
+// SPARC:typedef uint64_t uint_fast64_t;
+//
+// SPARC:typedef long int intptr_t;
+// SPARC:typedef unsigned long int uintptr_t;
+//
+// SPARC:typedef long long int intmax_t;
+// SPARC:typedef long long unsigned int uintmax_t;
+//
+// SPARC:INT8_MAX_ 127
+// SPARC:INT8_MIN_ (-128)
+// SPARC:UINT8_MAX_ 255
+// SPARC:INT_LEAST8_MIN_ (-128)
+// SPARC:INT_LEAST8_MAX_ 127
+// SPARC:UINT_LEAST8_MAX_ 255
+// SPARC:INT_FAST8_MIN_ (-128)
+// SPARC:INT_FAST8_MAX_ 127
+// SPARC:UINT_FAST8_MAX_ 255
+//
+// SPARC:INT16_MAX_ 32767
+// SPARC:INT16_MIN_ (-32768)
+// SPARC:UINT16_MAX_ 65535
+// SPARC:INT_LEAST16_MIN_ (-32768)
+// SPARC:INT_LEAST16_MAX_ 32767
+// SPARC:UINT_LEAST16_MAX_ 65535
+// SPARC:INT_FAST16_MIN_ (-32768)
+// SPARC:INT_FAST16_MAX_ 32767
+// SPARC:UINT_FAST16_MAX_ 65535
+//
+// SPARC:INT32_MAX_ 2147483647
+// SPARC:INT32_MIN_ (-2147483647 -1)
+// SPARC:UINT32_MAX_ 4294967295U
+// SPARC:INT_LEAST32_MIN_ (-2147483647 -1)
+// SPARC:INT_LEAST32_MAX_ 2147483647
+// SPARC:UINT_LEAST32_MAX_ 4294967295U
+// SPARC:INT_FAST32_MIN_ (-2147483647 -1)
+// SPARC:INT_FAST32_MAX_ 2147483647
+// SPARC:UINT_FAST32_MAX_ 4294967295U
+//
+// SPARC:INT64_MAX_ 9223372036854775807LL
+// SPARC:INT64_MIN_ (-9223372036854775807LL -1)
+// SPARC:UINT64_MAX_ 18446744073709551615ULL
+// SPARC:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
+// SPARC:INT_LEAST64_MAX_ 9223372036854775807LL
+// SPARC:UINT_LEAST64_MAX_ 18446744073709551615ULL
+// SPARC:INT_FAST64_MIN_ (-9223372036854775807LL -1)
+// SPARC:INT_FAST64_MAX_ 9223372036854775807LL
+// SPARC:UINT_FAST64_MAX_ 18446744073709551615ULL
+//
+// SPARC:INTPTR_MIN_ (-2147483647 -1)
+// SPARC:INTPTR_MAX_ 2147483647
+// SPARC:UINTPTR_MAX_ 4294967295U
+// SPARC:PTRDIFF_MIN_ (-2147483647 -1)
+// SPARC:PTRDIFF_MAX_ 2147483647
+// SPARC:SIZE_MAX_ 4294967295U
+//
+// SPARC:INTMAX_MIN_ (-9223372036854775807LL -1)
+// SPARC:INTMAX_MAX_ 9223372036854775807LL
+// SPARC:UINTMAX_MAX_ (9223372036854775807LL*2ULL +1ULL)
+//
+// SPARC:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// SPARC:SIG_ATOMIC_MAX_ 2147483647
+// SPARC:WINT_MIN_ (-2147483647 -1)
+// SPARC:WINT_MAX_ 2147483647
+//
+// SPARC:WCHAR_MAX_ 2147483647
+// SPARC:WCHAR_MIN_ (-2147483647 -1)
+//
+// SPARC:INT8_C_(0) (0)
+// SPARC:UINT8_C_(0) (0U)
+// SPARC:INT16_C_(0) (0)
+// SPARC:UINT16_C_(0) (0U)
+// SPARC:INT32_C_(0) (0)
+// SPARC:UINT32_C_(0) (0U)
+// SPARC:INT64_C_(0) (0LL)
+// SPARC:UINT64_C_(0) (0ULL)
+//
+// SPARC:INTMAX_C_(0) (0LL)
+// SPARC:UINTMAX_C_(0) (0ULL)
+//
+// RUN: clang-cc -E -ffreestanding -triple=tce-none-none %s | FileCheck -check-prefix TCE %s &&
+//
+// TCE:typedef signed char int8_t;
+// TCE:typedef short int16_t;
+// TCE:typedef int int32_t;
+//
+// TCE:typedef unsigned char uint8_t;
+// TCE:typedef int8_t int_least8_t;
+// TCE:typedef uint8_t uint_least8_t;
+// TCE:typedef int8_t int_fast8_t;
+// TCE:typedef uint8_t uint_fast8_t;
+//
+// TCE:typedef unsigned short uint16_t;
+// TCE:typedef int16_t int_least16_t;
+// TCE:typedef uint16_t uint_least16_t;
+// TCE:typedef int16_t int_fast16_t;
+// TCE:typedef uint16_t uint_fast16_t;
+//
+// TCE:typedef unsigned int uint32_t;
+// TCE:typedef int32_t int_least32_t;
+// TCE:typedef uint32_t uint_least32_t;
+// TCE:typedef int32_t int_fast32_t;
+// TCE:typedef uint32_t uint_fast32_t;
+//
+// TCE:typedef int intptr_t;
+// TCE:typedef unsigned int uintptr_t;
+//
+// TCE:typedef long int intmax_t;
+// TCE:typedef long unsigned int uintmax_t;
+//
+// TCE:INT8_MAX_ 127
+// TCE:INT8_MIN_ (-128)
+// TCE:UINT8_MAX_ 255
+// TCE:INT_LEAST8_MIN_ (-128)
+// TCE:INT_LEAST8_MAX_ 127
+// TCE:UINT_LEAST8_MAX_ 255
+// TCE:INT_FAST8_MIN_ (-128)
+// TCE:INT_FAST8_MAX_ 127
+// TCE:UINT_FAST8_MAX_ 255
+//
+// TCE:INT16_MAX_ 32767
+// TCE:INT16_MIN_ (-32768)
+// TCE:UINT16_MAX_ 65535
+// TCE:INT_LEAST16_MIN_ (-32768)
+// TCE:INT_LEAST16_MAX_ 32767
+// TCE:UINT_LEAST16_MAX_ 65535
+// TCE:INT_FAST16_MIN_ (-32768)
+// TCE:INT_FAST16_MAX_ 32767
+// TCE:UINT_FAST16_MAX_ 65535
+//
+// TCE:INT32_MAX_ 2147483647
+// TCE:INT32_MIN_ (-2147483647 -1)
+// TCE:UINT32_MAX_ 4294967295U
+// TCE:INT_LEAST32_MIN_ (-2147483647 -1)
+// TCE:INT_LEAST32_MAX_ 2147483647
+// TCE:UINT_LEAST32_MAX_ 4294967295U
+// TCE:INT_FAST32_MIN_ (-2147483647 -1)
+// TCE:INT_FAST32_MAX_ 2147483647
+// TCE:UINT_FAST32_MAX_ 4294967295U
+//
+// TCE:INT64_MAX_ INT64_MAX
+// TCE:INT64_MIN_ INT64_MIN
+// TCE:UINT64_MAX_ UINT64_MAX
+// TCE:INT_LEAST64_MIN_ INT_LEAST64_MIN
+// TCE:INT_LEAST64_MAX_ INT_LEAST64_MAX
+// TCE:UINT_LEAST64_MAX_ UINT_LEAST64_MAX
+// TCE:INT_FAST64_MIN_ INT_FAST64_MIN
+// TCE:INT_FAST64_MAX_ INT_FAST64_MAX
+// TCE:UINT_FAST64_MAX_ UINT_FAST64_MAX
+//
+// TCE:INTPTR_MIN_ (-2147483647 -1)
+// TCE:INTPTR_MAX_ 2147483647
+// TCE:UINTPTR_MAX_ 4294967295U
+// TCE:PTRDIFF_MIN_ (-2147483647 -1)
+// TCE:PTRDIFF_MAX_ 2147483647
+// TCE:SIZE_MAX_ 4294967295U
+//
+// TCE:INTMAX_MIN_ (-2147483647L -1)
+// TCE:INTMAX_MAX_ 2147483647L
+// TCE:UINTMAX_MAX_ (2147483647L*2ULL +1ULL)
+//
+// TCE:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// TCE:SIG_ATOMIC_MAX_ 2147483647
+// TCE:WINT_MIN_ (-2147483647 -1)
+// TCE:WINT_MAX_ 2147483647
+//
+// TCE:WCHAR_MAX_ 2147483647
+// TCE:WCHAR_MIN_ (-2147483647 -1)
+//
+// TCE:INT8_C_(0) (0)
+// TCE:UINT8_C_(0) (0U)
+// TCE:INT16_C_(0) (0)
+// TCE:UINT16_C_(0) (0U)
+// TCE:INT32_C_(0) (0)
+// TCE:UINT32_C_(0) (0U)
+// TCE:INT64_C_(0) INT64_C(0)
+// TCE:UINT64_C_(0) UINT64_C(0)
+//
+// TCE:INTMAX_C_(0) (0LL)
+// TCE:UINTMAX_C_(0) (0ULL)
+//
+// RUN: clang-cc -E -ffreestanding -triple=x86_64-none-none %s | FileCheck -check-prefix X86_64 %s &&
+//
+// X86_64:typedef signed char int8_t;
+// X86_64:typedef short int16_t;
+// X86_64:typedef int int32_t;
+// X86_64:typedef long int int64_t;
+//
+// X86_64:typedef unsigned char uint8_t;
+// X86_64:typedef int8_t int_least8_t;
+// X86_64:typedef uint8_t uint_least8_t;
+// X86_64:typedef int8_t int_fast8_t;
+// X86_64:typedef uint8_t uint_fast8_t;
+//
+// X86_64:typedef unsigned short uint16_t;
+// X86_64:typedef int16_t int_least16_t;
+// X86_64:typedef uint16_t uint_least16_t;
+// X86_64:typedef int16_t int_fast16_t;
+// X86_64:typedef uint16_t uint_fast16_t;
+//
+// X86_64:typedef unsigned int uint32_t;
+// X86_64:typedef int32_t int_least32_t;
+// X86_64:typedef uint32_t uint_least32_t;
+// X86_64:typedef int32_t int_fast32_t;
+// X86_64:typedef uint32_t uint_fast32_t;
+//
+// X86_64:typedef unsigned long int uint64_t;
+// X86_64:typedef int64_t int_least64_t;
+// X86_64:typedef uint64_t uint_least64_t;
+// X86_64:typedef int64_t int_fast64_t;
+// X86_64:typedef uint64_t uint_fast64_t;
+//
+// X86_64:typedef long int intptr_t;
+// X86_64:typedef unsigned long int uintptr_t;
+//
+// X86_64:typedef long int intmax_t;
+// X86_64:typedef long unsigned int uintmax_t;
+//
+// X86_64:INT8_MAX_ 127
+// X86_64:INT8_MIN_ (-128)
+// X86_64:UINT8_MAX_ 255
+// X86_64:INT_LEAST8_MIN_ (-128)
+// X86_64:INT_LEAST8_MAX_ 127
+// X86_64:UINT_LEAST8_MAX_ 255
+// X86_64:INT_FAST8_MIN_ (-128)
+// X86_64:INT_FAST8_MAX_ 127
+// X86_64:UINT_FAST8_MAX_ 255
+//
+// X86_64:INT16_MAX_ 32767
+// X86_64:INT16_MIN_ (-32768)
+// X86_64:UINT16_MAX_ 65535
+// X86_64:INT_LEAST16_MIN_ (-32768)
+// X86_64:INT_LEAST16_MAX_ 32767
+// X86_64:UINT_LEAST16_MAX_ 65535
+// X86_64:INT_FAST16_MIN_ (-32768)
+// X86_64:INT_FAST16_MAX_ 32767
+// X86_64:UINT_FAST16_MAX_ 65535
+//
+// X86_64:INT32_MAX_ 2147483647
+// X86_64:INT32_MIN_ (-2147483647 -1)
+// X86_64:UINT32_MAX_ 4294967295U
+// X86_64:INT_LEAST32_MIN_ (-2147483647 -1)
+// X86_64:INT_LEAST32_MAX_ 2147483647
+// X86_64:UINT_LEAST32_MAX_ 4294967295U
+// X86_64:INT_FAST32_MIN_ (-2147483647 -1)
+// X86_64:INT_FAST32_MAX_ 2147483647
+// X86_64:UINT_FAST32_MAX_ 4294967295U
+//
+// X86_64:INT64_MAX_ 9223372036854775807LL
+// X86_64:INT64_MIN_ (-9223372036854775807LL -1)
+// X86_64:UINT64_MAX_ 18446744073709551615ULL
+// X86_64:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
+// X86_64:INT_LEAST64_MAX_ 9223372036854775807LL
+// X86_64:UINT_LEAST64_MAX_ 18446744073709551615ULL
+// X86_64:INT_FAST64_MIN_ (-9223372036854775807LL -1)
+// X86_64:INT_FAST64_MAX_ 9223372036854775807LL
+// X86_64:UINT_FAST64_MAX_ 18446744073709551615ULL
+//
+// X86_64:INTPTR_MIN_ (-9223372036854775807LL -1)
+// X86_64:INTPTR_MAX_ 9223372036854775807LL
+// X86_64:UINTPTR_MAX_ 18446744073709551615ULL
+// X86_64:PTRDIFF_MIN_ (-9223372036854775807LL -1)
+// X86_64:PTRDIFF_MAX_ 9223372036854775807LL
+// X86_64:SIZE_MAX_ 18446744073709551615ULL
+//
+// X86_64:INTMAX_MIN_ (-9223372036854775807L -1)
+// X86_64:INTMAX_MAX_ 9223372036854775807L
+// X86_64:UINTMAX_MAX_ (9223372036854775807L*2ULL +1ULL)
+//
+// X86_64:SIG_ATOMIC_MIN_ (-2147483647 -1)
+// X86_64:SIG_ATOMIC_MAX_ 2147483647
+// X86_64:WINT_MIN_ (-2147483647 -1)
+// X86_64:WINT_MAX_ 2147483647
+//
+// X86_64:WCHAR_MAX_ 2147483647
+// X86_64:WCHAR_MIN_ (-2147483647 -1)
+//
+// X86_64:INT8_C_(0) (0)
+// X86_64:UINT8_C_(0) (0U)
+// X86_64:INT16_C_(0) (0)
+// X86_64:UINT16_C_(0) (0U)
+// X86_64:INT32_C_(0) (0)
+// X86_64:UINT32_C_(0) (0U)
+// X86_64:INT64_C_(0) (0LL)
+// X86_64:UINT64_C_(0) (0ULL)
+//
+// X86_64:INTMAX_C_(0) (0LL)
+// X86_64:UINTMAX_C_(0) (0ULL)
+//
+// RUN: true
+
+#include <stdint.h>
+
+INT8_MAX_ INT8_MAX
+INT8_MIN_ INT8_MIN
+UINT8_MAX_ UINT8_MAX
+INT_LEAST8_MIN_ INT_LEAST8_MIN
+INT_LEAST8_MAX_ INT_LEAST8_MAX
+UINT_LEAST8_MAX_ UINT_LEAST8_MAX
+INT_FAST8_MIN_ INT_FAST8_MIN
+INT_FAST8_MAX_ INT_FAST8_MAX
+UINT_FAST8_MAX_ UINT_FAST8_MAX
+
+INT16_MAX_ INT16_MAX
+INT16_MIN_ INT16_MIN
+UINT16_MAX_ UINT16_MAX
+INT_LEAST16_MIN_ INT_LEAST16_MIN
+INT_LEAST16_MAX_ INT_LEAST16_MAX
+UINT_LEAST16_MAX_ UINT_LEAST16_MAX
+INT_FAST16_MIN_ INT_FAST16_MIN
+INT_FAST16_MAX_ INT_FAST16_MAX
+UINT_FAST16_MAX_ UINT_FAST16_MAX
+
+INT32_MAX_ INT32_MAX
+INT32_MIN_ INT32_MIN
+UINT32_MAX_ UINT32_MAX
+INT_LEAST32_MIN_ INT_LEAST32_MIN
+INT_LEAST32_MAX_ INT_LEAST32_MAX
+UINT_LEAST32_MAX_ UINT_LEAST32_MAX
+INT_FAST32_MIN_ INT_FAST32_MIN
+INT_FAST32_MAX_ INT_FAST32_MAX
+UINT_FAST32_MAX_ UINT_FAST32_MAX
+
+INT64_MAX_ INT64_MAX
+INT64_MIN_ INT64_MIN
+UINT64_MAX_ UINT64_MAX
+INT_LEAST64_MIN_ INT_LEAST64_MIN
+INT_LEAST64_MAX_ INT_LEAST64_MAX
+UINT_LEAST64_MAX_ UINT_LEAST64_MAX
+INT_FAST64_MIN_ INT_FAST64_MIN
+INT_FAST64_MAX_ INT_FAST64_MAX
+UINT_FAST64_MAX_ UINT_FAST64_MAX
+
+INTPTR_MIN_ INTPTR_MIN
+INTPTR_MAX_ INTPTR_MAX
+UINTPTR_MAX_ UINTPTR_MAX
+PTRDIFF_MIN_ PTRDIFF_MIN
+PTRDIFF_MAX_ PTRDIFF_MAX
+SIZE_MAX_ SIZE_MAX
+
+INTMAX_MIN_ INTMAX_MIN
+INTMAX_MAX_ INTMAX_MAX
+UINTMAX_MAX_ UINTMAX_MAX
+
+SIG_ATOMIC_MIN_ SIG_ATOMIC_MIN
+SIG_ATOMIC_MAX_ SIG_ATOMIC_MAX
+WINT_MIN_ WINT_MIN
+WINT_MAX_ WINT_MAX
+
+WCHAR_MAX_ WCHAR_MAX
+WCHAR_MIN_ WCHAR_MIN
+
+INT8_C_(0) INT8_C(0)
+UINT8_C_(0) UINT8_C(0)
+INT16_C_(0) INT16_C(0)
+UINT16_C_(0) UINT16_C(0)
+INT32_C_(0) INT32_C(0)
+UINT32_C_(0) UINT32_C(0)
+INT64_C_(0) INT64_C(0)
+UINT64_C_(0) UINT64_C(0)
+
+INTMAX_C_(0) INTMAX_C(0)
+UINTMAX_C_(0) UINTMAX_C(0)
diff --git a/test/Preprocessor/stringize_misc.c b/test/Preprocessor/stringize_misc.c
index 251116a..60d66a0 100644
--- a/test/Preprocessor/stringize_misc.c
+++ b/test/Preprocessor/stringize_misc.c
@@ -1,20 +1,23 @@
-// RUN: clang-cc -E %s | grep -F '"f(1, 2)" "g((x=y++, y))"' &&
-// RUN: clang-cc -E %s | grep -F '"{a=1" "b=2;}"' &&
-// RUN: clang-cc -E %s | grep -F '"<" "["' &&
-// RUN: clang-cc -E %s | grep -F '"(,)" "(...)"' &&
-// RUN: clang-cc -E %s | grep -F '{a=1 c=3; b=2;}' &&
-// RUN: clang-cc -E %s | grep -F '"a COMMA b" "(a, b)"'
+// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s
#define M(x, y) #x #y
M( f(1, 2), g((x=y++, y)))
+// CHECK: "f(1, 2)" "g((x=y++, y))"
+
M( {a=1 , b=2;} ) /* A semicolon is not a comma */
+// CHECK: "{a=1" "b=2;}"
+
M( <, [ ) /* Passes the arguments < and [ */
+// CHECK: "<" "["
+
M( (,), (...) ) /* Passes the arguments (,) and (...) */
+// CHECK: "(,)" "(...)"
#define START_END(start, end) start c=3; end
START_END( {a=1 , b=2;} ) /* braces are not parentheses */
+// CHECK: {a=1 c=3; b=2;}
/*
* To pass a comma token as an argument it is
@@ -23,4 +26,5 @@ START_END( {a=1 , b=2;} ) /* braces are not parentheses */
#define COMMA ,
M(a COMMA b, (a, b))
+// CHECK: "a COMMA b" "(a, b)"
OpenPOWER on IntegriCloud