microsoft-call-conv-x64.c revision 54db3244f425dae51cde7c6298ec42d0764f8ed8
1// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm < %s | FileCheck %s 2 3void __fastcall f1(void); 4void __stdcall f2(void); 5void __fastcall f4(void) { 6// CHECK: define void @f4() 7 f1(); 8// CHECK: call void @f1() 9} 10void __stdcall f5(void) { 11// CHECK: define void @f5() 12 f2(); 13// CHECK: call void @f2() 14} 15 16// PR5280 17void (__fastcall *pf1)(void) = f1; 18void (__stdcall *pf2)(void) = f2; 19void (__fastcall *pf4)(void) = f4; 20void (__stdcall *pf5)(void) = f5; 21 22int main(void) { 23 f4(); f5(); 24 // CHECK: call void @f4() 25 // CHECK: call void @f5() 26 pf1(); pf2(); pf4(); pf5(); 27 // CHECK: call void %{{.*}}() 28 // CHECK: call void %{{.*}}() 29 // CHECK: call void %{{.*}}() 30 // CHECK: call void %{{.*}}() 31 return 0; 32} 33 34// PR7117 35void __stdcall f7(foo) int foo; {} 36void f8(void) { 37 f7(0); 38 // CHECK: call void @f7(i32 0) 39} 40