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: 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
10void __stdcall StdcallFn() {}
11void __fastcall FastcallFn() {}
12void __thiscall ThiscallFn() {}
13void __cdecl CdeclFn() {}
14void __vectorcall VectorcallFn() {}
15
16auto sfn = &StdcallFn;
17// CHECK: (void (*)() __attribute__((stdcall))) sfn = {{.*}}
18
19auto ffn = &FastcallFn;
20// CHECK: (void (*)() __attribute__((fastcall))) ffn = {{.*}}
21
22auto tfn = &ThiscallFn;
23// CHECK: (void (*)() __attribute__((thiscall))) tfn = {{.*}}
24
25auto cfn = &CdeclFn;
26// CHECK: (void (*)()) cfn = {{.*}}
27
28auto vfn = &VectorcallFn;
29// CHECK: (void (*)() __attribute__((vectorcall))) vfn = {{.*}}
30
31int main(int argc, char **argv) {
32 return 0;
33}
34

source code of lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp