Author: compnerd Date: Tue Mar 20 10:33:26 2018 New Revision: 328007 URL: http://llvm.org/viewvc/llvm-project?rev=328007&view=rev Log: Basic: support PreserveMost and PreserveAll on Windows ARM
Do not ignore these calling conventions on Windows ARM. They are used by the swift runtime for certain calls. Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp cfe/trunk/test/CodeGen/preserve-call-conv.c cfe/trunk/test/Sema/preserve-call-conv.c Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/ARM.cpp?rev=328007&r1=328006&r2=328007&view=diff ============================================================================== --- cfe/trunk/lib/Basic/Targets/ARM.cpp (original) +++ cfe/trunk/lib/Basic/Targets/ARM.cpp Tue Mar 20 10:33:26 2018 @@ -971,6 +971,8 @@ WindowsARMTargetInfo::checkCallingConven return CCCR_Ignore; case CC_C: case CC_OpenCLKernel: + case CC_PreserveMost: + case CC_PreserveAll: return CCCR_OK; default: return CCCR_Warning; Modified: cfe/trunk/test/CodeGen/preserve-call-conv.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/preserve-call-conv.c?rev=328007&r1=328006&r2=328007&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/preserve-call-conv.c (original) +++ cfe/trunk/test/CodeGen/preserve-call-conv.c Tue Mar 20 10:33:26 2018 @@ -3,6 +3,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -emit-llvm %s -o - | FileCheck %s // RUN: %clang_cc1 -triple aarch64-unknown-windows-msvc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -emit-llvm %s -o - | FileCheck %s // Check that the preserve_most calling convention attribute at the source level // is lowered to the corresponding calling convention attrribute at the LLVM IR Modified: cfe/trunk/test/Sema/preserve-call-conv.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/preserve-call-conv.c?rev=328007&r1=328006&r2=328007&view=diff ============================================================================== --- cfe/trunk/test/Sema/preserve-call-conv.c (original) +++ cfe/trunk/test/Sema/preserve-call-conv.c Tue Mar 20 10:33:26 2018 @@ -2,6 +2,7 @@ // RUN: %clang_cc1 %s -fsyntax-only -triple arm64-unknown-unknown -verify // RUN: %clang_cc1 %s -fsyntax-only -triple x86_64-unknown-windows-msvc -verify // RUN: %clang_cc1 %s -fsyntax-only -triple aarch64-unknown-windows-msvc -verify +// RUN: %clang_cc1 %s -fsyntax-only -triple thumbv7-unknown-windows-msvc -verify typedef void typedef_fun_t(int); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits