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