xref: /llvm-project/lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp (revision cf3464bbb796d492bcd4e764ada945304e0c874f)
1 // clang-format off
2 // REQUIRES: lld, x86
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: %lldb -f %t.exe -s \
7 // RUN:     %p/Inputs/function-types-calling-conv.lldbinit | FileCheck %s
8 
9 
10 void __stdcall StdcallFn() {}
11 void __fastcall FastcallFn() {}
12 void __thiscall ThiscallFn() {}
13 void __cdecl CdeclFn() {}
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 
31 int main(int argc, char **argv) {
32   return 0;
33 }
34