Skip to content

Commit

Permalink
[mac/arm] Fix clang/test/Sema/wchar.c on mac/arm hosts
Browse files Browse the repository at this point in the history
Part of PR46644.
  • Loading branch information
nico committed Nov 21, 2020
1 parent 4108326 commit c473184
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions clang/test/Sema/wchar.c
Expand Up @@ -6,15 +6,22 @@ typedef __WCHAR_TYPE__ wchar_t;
#if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \
|| defined(_M_X64) || defined(__ORBIS__) || defined(SHORT_WCHAR)
#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
#elif defined(__sun)
#if defined(__LP64__)
#define WCHAR_T_TYPE int
#else
#define WCHAR_T_TYPE long
#endif
#else /* Solaris. */
#else /* Solaris, Linux, non-arm64 macOS, ... */
#define WCHAR_T_TYPE int
#endif

Expand Down

0 comments on commit c473184

Please sign in to comment.