1 // RUN: %clang_cc1 -triple i386-pc-solaris -dM -E %s -o - | FileCheck %s -check-prefix CHECK-SOLARIS
2 // CHECK-SOLARIS-DAG: #define __WCHAR_MAX__ 2147483647
3 // CHECK-SOLARIS-DAG: #define __WCHAR_TYPE__ long int
4 // CHECK-SOLARIS-NOT: #define __WCHAR_UNSIGNED__ 0
6 // RUN: %clang_cc1 -triple x86_64-pc-solaris -dM -E %s -o - | FileCheck %s -check-prefix CHECK-SOLARIS64
7 // CHECK-SOLARIS64-DAG: #define __WCHAR_MAX__ 2147483647
8 // CHECK-SOLARIS64-DAG: #define __WCHAR_TYPE__ int
9 // CHECK-SOLARIS64-NOT: #define __WCHAR_UNSIGNED__ 0
11 // RUN: %clang_cc1 -triple avr-unknown-unknown -fwchar-type=int -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-AVR
12 // CHECK-AVR-DAG: #define __WCHAR_MAX__ 32767
13 // CHECK-AVR-DAG: #define __WCHAR_TYPE__ int
14 // CHECK-AVR-NOT: #define __WCHAR_UNSIGNED__ 0
16 // RUN: %clang_cc1 -triple arm-unknown-none-gnu -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-ARM-APCS
17 // CHECK-ARM-APCS-DAG: #define __WCHAR_MAX__ 2147483647
18 // CHECK-ARM-APCS-DAG: #define __WCHAR_TYPE__ int
19 // CHECK-ARM-APCS-NOT: #define __WCHAR_UNSIGNED__ 0
21 // RUN: %clang_cc1 -triple arm-unknown-netbsd-gnu -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-ARM-NETBSD-AAPCS
22 // CHECK-ARM-NETBSD-AAPCS-DAG: #define __WCHAR_MAX__ 2147483647
23 // CHECK-ARM-NETBSD-AAPCS-DAG: #define __WCHAR_TYPE__ int
24 // CHECK-ARM-NETBSD-AAPCS-NOT: #define __WCHAR_UNSIGNED__ 0
26 // RUN: %clang_cc1 -triple arm-unknown-openbsd -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-ARM-OPENBSD
27 // CHECK-ARM-OPENBSD-DAG: #define __WCHAR_MAX__ 2147483647
28 // CHECK-ARM-OPENBSD-DAG: #define __WCHAR_TYPE__ int
29 // CHECK-ARM-OPENBSD-NOT: #define __WCHAR_UNSIGNED__ 0
31 // RUN: %clang_cc1 -triple arm64-apple-ios -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-ARM64-DARWIN
32 // CHECK-ARM64-DARWIN-DAG: #define __WCHAR_MAX__ 2147483647
33 // CHECK-ARM64-DARWIN-DAG: #define __WCHAR_TYPE__ int
34 // CHECK-ARM64-DARWIN-NOT: #define __WCHAR_UNSIGNED__ 0
36 // RUN: %clang_cc1 -triple aarch64-unknown-netbsd -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-ARM64-NETBSD
37 // CHECK-ARM64-NETBSD-DAG: #define __WCHAR_MAX__ 2147483647
38 // CHECK-ARM64-NETBSD-DAG: #define __WCHAR_TYPE__ int
39 // CHECK-ARM64-NETBSD-NOT: #define __WCHAR_UNSIGNED__ 0
41 // RUN: %clang_cc1 -triple aarch64-unknown-openbsd -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-ARM64-OPENBSD
42 // CHECK-ARM64-OPENBSD-DAG: #define __WCHAR_MAX__ 2147483647
43 // CHECK-ARM64-OPENBSD-DAG: #define __WCHAR_TYPE__ int
44 // CHECK-ARM64-OPENBSD-NOT: #define __WCHAR_UNSIGNED__ 0
46 // RUN: %clang_cc1 -triple aarch64-unknown-none -fwchar-type=int -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-ARM64-AAPCS64
47 // CHECK-ARM64-AAPCS64-DAG: #define __WCHAR_MAX__ 4294967295U
48 // CHECK-ARM64-AAPCS64-DAG: #define __WCHAR_TYPE__ unsigned int
49 // CHECK-ARM64-AAPCS64-DAG: #define __WCHAR_UNSIGNED__ 1
51 // RUN: %clang_cc1 -triple s390x-none-zos -fwchar-type=int -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-ZOS
52 // CHECK-ZOS: #define __WCHAR_MAX__ 4294967295U
53 // CHECK-ZOS: #define __WCHAR_TYPE__ unsigned int
54 // CHECK-ZOS: #define __WCHAR_UNSIGNED__ 1
56 // RUN: %clang_cc1 -triple xcore-unknown-unknown -fwchar-type=char -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-XCORE
57 // CHECK-XCORE-DAG: #define __WCHAR_MAX__ 255
58 // CHECK-XCORE-DAG: #define __WCHAR_TYPE__ unsigned char
59 // CHECK-XCORE-DAG: #define __WCHAR_UNSIGNED__ 1
61 // RUN: %clang_cc1 -triple x86_64-unknown-windows-cygnus -fwchar-type=short -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-CYGWIN-X64
62 // CHECK-CYGWIN-X64-DAG: #define __WCHAR_MAX__ 65535
63 // CHECK-CYGWIN-X64-DAG: #define __WCHAR_TYPE__ unsigned short
64 // CHECK-CYGWIN-X64-DAG: #define __WCHAR_UNSIGNED__ 1
66 // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -fwchar-type=short -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-MSVC-X64
67 // CHECK-MSVC-X64-DAG: #define __WCHAR_MAX__ 65535
68 // CHECK-MSVC-X64-DAG: #define __WCHAR_TYPE__ unsigned short
69 // CHECK-MSVC-X64-DAG: #define __WCHAR_UNSIGNED__ 1
71 // RUN: %clang_cc1 -triple i686-unknown-windows-cygnus -fwchar-type=short -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-CYGWIN-X86
72 // CHECK-CYGWIN-X86-DAG: #define __WCHAR_MAX__ 65535
73 // CHECK-CYGWIN-X86-DAG: #define __WCHAR_TYPE__ unsigned short
74 // CHECK-CYGWIN-X86-DAG: #define __WCHAR_UNSIGNED__ 1
76 // RUN: %clang_cc1 -triple i686-unknown-windows-msvc -fwchar-type=short -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-MSVC-X86
77 // CHECK-MSVC-X86-DAG: #define __WCHAR_MAX__ 65535
78 // CHECK-MSVC-X86-DAG: #define __WCHAR_TYPE__ unsigned short
79 // CHECK-MSVC-X86-DAG: #define __WCHAR_UNSIGNED__ 1
81 // RUN: %clang_cc1 -triple x86_64-scei-ps4 -fwchar-type=short -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-PS4
82 // CHECK-PS4-DAG: #define __WCHAR_MAX__ 65535
83 // CHECK-PS4-DAG: #define __WCHAR_TYPE__ unsigned short
84 // CHECK-PS4-DAG: #define __WCHAR_UNSIGNED__ 1
86 // RUN: %clang_cc1 -triple thumbv7-unknown-windows-cygnus -fwchar-type=short -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-CYGWIN-ARM
87 // CHECK-CYGWIN-ARM-DAG: #define __WCHAR_MAX__ 65535
88 // CHECK-CYGWIN-ARM-DAG: #define __WCHAR_TYPE__ unsigned short
89 // CHECK-CYGWIN-ARM-DAG: #define __WCHAR_UNSIGNED__ 1
91 // RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -fwchar-type=short -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-MSVC-ARM
92 // CHECK-MSVC-ARM-DAG: #define __WCHAR_MAX__ 65535
93 // CHECK-MSVC-ARM-DAG: #define __WCHAR_TYPE__ unsigned short
94 // CHECK-MSVC-ARM-DAG: #define __WCHAR_UNSIGNED__ 1
96 // RUN: %clang_cc1 -triple aarch64-unknown-windows-msvc -fwchar-type=short -fno-signed-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-MSVC-ARM64
97 // CHECK-MSVC-ARM64-DAG: #define __WCHAR_MAX__ 65535
98 // CHECK-MSVC-ARM64-DAG: #define __WCHAR_TYPE__ unsigned short
99 // CHECK-MSVC-ARM64-DAG: #define __WCHAR_UNSIGNED__ 1
101 // RUN: %clang_cc1 -triple i386-apple-macosx -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
102 // RUN: %clang_cc1 -triple x86_64-apple-macosx -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
103 // RUN: %clang_cc1 -triple ppc64-apple-macosx -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
104 // RUN: %clang_cc1 -triple i386-apple-ios -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
105 // RUN: %clang_cc1 -triple x86_64-apple-ios -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
106 // RUN: %clang_cc1 -triple armv7-apple-ios -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
107 // RUN: %clang_cc1 -triple aarch64-apple-ios -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
108 // RUN: %clang_cc1 -triple i386-apple-tvos -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
109 // RUN: %clang_cc1 -triple x86_64-apple-tvos -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
110 // RUN: %clang_cc1 -triple armv7-apple-tvos -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
111 // RUN: %clang_cc1 -triple aarch64-apple-tvos -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
112 // RUN: %clang_cc1 -triple i386-apple-watchos -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
113 // RUN: %clang_cc1 -triple x86_64-apple-watchos -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
114 // RUN: %clang_cc1 -triple armv7-apple-watchos -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
115 // RUN: %clang_cc1 -triple aarch64-apple-watchos -dM -E %s -o - | FileCheck %s -check-prefix CHECK-DARWIN
116 // CHECK-DARWIN: #define __WCHAR_TYPE__ int
118 // RUN: %clang_cc1 -triple i686-unknown-windows-msvc -fwchar-type=int -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-WINDOWS-ISO10646
119 // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -fwchar-type=int -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-WINDOWS-ISO10646
120 // RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -fwchar-type=int -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-WINDOWS-ISO10646
121 // RUN: %clang_cc1 -triple aarch64-unknown-windows-msvc -fwchar-type=int -fsigned-wchar -dM -E %s -o - | FileCheck %s -check-prefix CHECK-WINDOWS-ISO10646
122 // CHECK-WINDOWS-ISO10646: #define __WCHAR_TYPE__ int