[mac/arm] Fix clang/test/Sema/wchar.c on mac/arm hosts

Part of PR46644.
This commit is contained in:
Nico Weber 2020-11-20 21:48:40 -05:00
parent 41083267a9
commit c473184914
1 changed files with 9 additions and 2 deletions

View File

@ -6,7 +6,14 @@ typedef __WCHAR_TYPE__ wchar_t;
#if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \ #if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \
|| defined(_M_X64) || defined(__ORBIS__) || defined(SHORT_WCHAR) || defined(_M_X64) || defined(__ORBIS__) || defined(SHORT_WCHAR)
#define WCHAR_T_TYPE unsigned short #define WCHAR_T_TYPE unsigned short
#elif defined(__arm) || defined(__aarch64__) || defined(__MVS__) #elif defined(__aarch64__)
// See AArch64TargetInfo constructor -- unsigned on non-darwin non-OpenBSD non-NetBSD.
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__NetBSD__)
#define WCHAR_T_TYPE int
#else
#define WCHAR_T_TYPE unsigned int
#endif
#elif defined(__arm) || defined(__MVS__)
#define WCHAR_T_TYPE unsigned int #define WCHAR_T_TYPE unsigned int
#elif defined(__sun) #elif defined(__sun)
#if defined(__LP64__) #if defined(__LP64__)
@ -14,7 +21,7 @@ typedef __WCHAR_TYPE__ wchar_t;
#else #else
#define WCHAR_T_TYPE long #define WCHAR_T_TYPE long
#endif #endif
#else /* Solaris. */ #else /* Solaris, Linux, non-arm64 macOS, ... */
#define WCHAR_T_TYPE int #define WCHAR_T_TYPE int
#endif #endif