From c47318491439642ed47cb9c9098333a8199fa54a Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 20 Nov 2020 21:48:40 -0500 Subject: [PATCH 1/3] [mac/arm] Fix clang/test/Sema/wchar.c on mac/arm hosts Part of PR46644. --- clang/test/Sema/wchar.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/clang/test/Sema/wchar.c b/clang/test/Sema/wchar.c index 3170e363ff7733..83ea6372168d62 100644 --- a/clang/test/Sema/wchar.c +++ b/clang/test/Sema/wchar.c @@ -6,7 +6,14 @@ 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__) @@ -14,7 +21,7 @@ typedef __WCHAR_TYPE__ wchar_t; #else #define WCHAR_T_TYPE long #endif -#else /* Solaris. */ +#else /* Solaris, Linux, non-arm64 macOS, ... */ #define WCHAR_T_TYPE int #endif From e91b2344ad7294c47d8b10b3a84e962bc3ed4160 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 20 Nov 2020 22:32:31 -0500 Subject: [PATCH 2/3] [mac/arm] Fix test/Driver/darwin-sdk-version.c on arm macs Two invocations in this test used `-m64`, which on an arm mac means arm64 in the triple, not x86_64. --- clang/test/Driver/darwin-sdk-version.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/test/Driver/darwin-sdk-version.c b/clang/test/Driver/darwin-sdk-version.c index 9c1eec0ee43ff7..e95103b7cfb580 100644 --- a/clang/test/Driver/darwin-sdk-version.c +++ b/clang/test/Driver/darwin-sdk-version.c @@ -30,8 +30,8 @@ // RUN: | FileCheck --check-prefixes=NO_VERSION,ERROR %s // CHECK: -target-sdk-version=10.14 -// INFER_SDK_VERSION: "-triple" "x86_64-apple-macosx10.10.0" +// INFER_SDK_VERSION: "-triple" "{{arm64|x86_64}}-apple-macosx10.10.0" // INFER_SDK_VERSION-SAME: -target-sdk-version=10.10 -// INFER_DEPLOYMENT_TARGET_VERSION: "-triple" "x86_64-apple-macosx10.8.0" +// INFER_DEPLOYMENT_TARGET_VERSION: "-triple" "{{arm64|x86_64}}-apple-macosx10.8.0" // NO_VERSION-NOT: target-sdk-version // ERROR: warning: SDK settings were ignored as 'SDKSettings.json' could not be parsed From a2dc4ac86b8e5a64f5ac4185c43fef1cad58618f Mon Sep 17 00:00:00 2001 From: "Kazushi (Jam) Marukawa" Date: Sat, 21 Nov 2020 13:07:29 +0900 Subject: [PATCH 3/3] [VE][NFC] Update missing bulk update tests to use typed sret --- llvm/test/CodeGen/VE/Scalar/callstruct.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/test/CodeGen/VE/Scalar/callstruct.ll b/llvm/test/CodeGen/VE/Scalar/callstruct.ll index 8af058f19284d1..4b5b788adfd4fa 100644 --- a/llvm/test/CodeGen/VE/Scalar/callstruct.ll +++ b/llvm/test/CodeGen/VE/Scalar/callstruct.ll @@ -43,4 +43,4 @@ define void @caller() { ret void } -declare void @callee(%struct.a* sret, i32, i32) +declare void @callee(%struct.a* sret(%struct.a), i32, i32)