1 // RUN: %clang_cc1 -triple x86_64-unknown-windows -emit-llvm -target-cpu core2 -o - %s | FileCheck %s
3 #define SWIFTCALL __attribute__((swiftcall))
4 #define OUT __attribute__((swift_indirect_result))
5 #define ERROR __attribute__((swift_error_result))
6 #define CONTEXT __attribute__((swift_context))
8 /*****************************************************************************/
9 /****************************** PARAMETER ABIS *******************************/
10 /*****************************************************************************/
12 // Swift doesn't use inalloca like windows x86 normally does.
15 NonTrivial(const NonTrivial
&);
19 SWIFTCALL
int receiveNonTrivial(NonTrivial o
) { return o
.o
; }
21 // CHECK-LABEL: define dso_local swiftcc noundef i32 @"?receiveNonTrivial@@YSHUNonTrivial@@@Z"(ptr noundef %o)
23 int passNonTrivial() {
24 return receiveNonTrivial({});
27 // CHECK-LABEL: define dso_local noundef i32 @"?passNonTrivial@@YAHXZ"()
28 // CHECK-NOT: stacksave
29 // CHECK: call swiftcc noundef i32 @"?receiveNonTrivial@@YSHUNonTrivial@@@Z"(ptr noundef %{{.*}})