1// RUN: %clang_cc1 -triple i386-unknown-linux-gnu -fdefault-calling-conv=cdecl -emit-llvm -o - %s | FileCheck %s --check-prefix=CDECL --check-prefix=ALL 2// RUN: %clang_cc1 -triple i786-unknown-linux-gnu -target-feature +sse4.2 -fdefault-calling-conv=fastcall -emit-llvm -o - %s | FileCheck %s --check-prefix=FASTCALL --check-prefix=ALL 3// RUN: %clang_cc1 -triple i486-unknown-linux-gnu -fdefault-calling-conv=stdcall -emit-llvm -o - %s | FileCheck %s --check-prefix=STDCALL --check-prefix=ALL 4// RUN: %clang_cc1 -triple i486-unknown-linux-gnu -mrtd -emit-llvm -o - %s | FileCheck %s --check-prefix=STDCALL --check-prefix=ALL 5// RUN: %clang_cc1 -triple i986-unknown-linux-gnu -fdefault-calling-conv=vectorcall -emit-llvm -o - %s | FileCheck %s --check-prefix=VECTORCALL --check-prefix=ALL 6 7// CDECL: define void @_Z5test1v 8// FASTCALL: define x86_fastcallcc void @_Z5test1v 9// STDCALL: define x86_stdcallcc void @_Z5test1v 10// VECTORCALL: define x86_vectorcallcc void @_Z5test1v 11void test1() {} 12 13// ALL: define void @_Z5test2v 14void __attribute__((cdecl)) test2() {} 15 16// ALL: define x86_fastcallcc void @_Z5test3v 17void __attribute__((fastcall)) test3() {} 18 19// ALL: define x86_stdcallcc void @_Z5test4v 20void __attribute__((stdcall)) test4() {} 21 22// ALL: define x86_vectorcallcc void @_Z5test5v 23void __attribute__((vectorcall)) test5() {} 24 25// ALL: define linkonce_odr void @_ZN1A11test_memberEv 26class A { 27public: 28 void test_member() {} 29}; 30 31void test() { 32 A a; 33 a.test_member(); 34} 35