[PATCH] D36105: [AArch64] Ignore stdcall and similar on aarch64/windows

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 13:54:30 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL310303: [AArch64] Ignore stdcall and similar on aarch64/windows (authored by mstorsjo).

Changed prior to commit:
  https://reviews.llvm.org/D36105?vs=108977&id=110082#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D36105

Files:
  cfe/trunk/lib/Basic/Targets/AArch64.cpp
  cfe/trunk/lib/Basic/Targets/AArch64.h
  cfe/trunk/test/Parser/arm-windows-calling-convention-handling.c


Index: cfe/trunk/lib/Basic/Targets/AArch64.cpp
===================================================================
--- cfe/trunk/lib/Basic/Targets/AArch64.cpp
+++ cfe/trunk/lib/Basic/Targets/AArch64.cpp
@@ -458,6 +458,23 @@
   return TargetInfo::CharPtrBuiltinVaList;
 }
 
+TargetInfo::CallingConvCheckResult
+MicrosoftARM64TargetInfo::checkCallingConvention(CallingConv CC) const {
+  switch (CC) {
+  case CC_X86StdCall:
+  case CC_X86ThisCall:
+  case CC_X86FastCall:
+  case CC_X86VectorCall:
+    return CCCR_Ignore;
+  case CC_C:
+  case CC_OpenCLKernel:
+  case CC_Win64:
+    return CCCR_OK;
+  default:
+    return CCCR_Warning;
+  }
+}
+
 DarwinAArch64TargetInfo::DarwinAArch64TargetInfo(const llvm::Triple &Triple,
                                                  const TargetOptions &Opts)
     : DarwinTargetInfo<AArch64leTargetInfo>(Triple, Opts) {
Index: cfe/trunk/lib/Basic/Targets/AArch64.h
===================================================================
--- cfe/trunk/lib/Basic/Targets/AArch64.h
+++ cfe/trunk/lib/Basic/Targets/AArch64.h
@@ -105,6 +105,8 @@
                         MacroBuilder &Builder) const override;
 
   BuiltinVaListKind getBuiltinVaListKind() const override;
+
+  CallingConvCheckResult checkCallingConvention(CallingConv CC) const override;
 };
 
 class LLVM_LIBRARY_VISIBILITY AArch64beTargetInfo : public AArch64TargetInfo {
Index: cfe/trunk/test/Parser/arm-windows-calling-convention-handling.c
===================================================================
--- cfe/trunk/test/Parser/arm-windows-calling-convention-handling.c
+++ cfe/trunk/test/Parser/arm-windows-calling-convention-handling.c
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple aarch64-windows -fms-compatibility -fsyntax-only -verify %s
 
 int __cdecl cdecl(int a, int b, int c, int d) { // expected-no-diagnostics
   return a + b + c + d;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36105.110082.patch
Type: text/x-patch
Size: 1946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170807/5ba7e5fb/attachment.bin>


More information about the cfe-commits mailing list