• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // clang-format off
2 // REQUIRES: lld
3 
4 // RUN: %clang_cl --target=i386-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
5 // RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
6 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
7 // RUN:     %p/Inputs/function-types-calling-conv.lldbinit | FileCheck %s
8 
9 
StdcallFn()10 void __stdcall StdcallFn() {}
FastcallFn()11 void __fastcall FastcallFn() {}
ThiscallFn()12 void __thiscall ThiscallFn() {}
CdeclFn()13 void __cdecl CdeclFn() {}
VectorcallFn()14 void __vectorcall VectorcallFn() {}
15 
16 auto sfn = &StdcallFn;
17 // CHECK: (void (*)() __attribute__((stdcall))) sfn = {{.*}}
18 
19 auto ffn = &FastcallFn;
20 // CHECK: (void (*)() __attribute__((fastcall))) ffn = {{.*}}
21 
22 auto tfn = &ThiscallFn;
23 // CHECK: (void (*)() __attribute__((thiscall))) tfn = {{.*}}
24 
25 auto cfn = &CdeclFn;
26 // CHECK: (void (*)()) cfn = {{.*}}
27 
28 auto vfn = &VectorcallFn;
29 // CHECK: (void (*)() __attribute__((vectorcall))) vfn = {{.*}}
30 
main(int argc,char ** argv)31 int main(int argc, char **argv) {
32   return 0;
33 }
34