]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGenCXX/debug-info-calling-conventions.cpp
Vendor import of clang trunk r290819:
[FreeBSD/FreeBSD.git] / test / CodeGenCXX / debug-info-calling-conventions.cpp
1 // RUN: %clang_cc1 %s -triple=i686-pc-windows-msvc -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
2
3 struct A {
4   void thiscallcc();
5 };
6 void A::thiscallcc() {}
7
8 // CHECK: !DISubprogram(name: "thiscallcc", {{.*}} type: ![[thiscallty:[^,]*]], {{.*}})
9 // CHECK: ![[thiscallty]] = !DISubroutineType(cc: DW_CC_BORLAND_thiscall, types: ![[thisargs:[^,)]*]])
10 // CHECK: ![[thisargs]] = !{null, ![[thisptrty:[^,}]*]]}
11 // CHECK: ![[thisptrty]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{.*}}, size: 32, flags: DIFlagArtificial | DIFlagObjectPointer)
12
13 void cdeclcc() {}
14 void __fastcall fastcallcc() {}
15 void __stdcall stdcallcc() {}
16 void __vectorcall vectorcallcc() {}
17
18 // CHECK: !DISubprogram(name: "cdeclcc", {{.*}} type: ![[cdeclty:[^,]*]], {{.*}})
19 // CHECK: ![[cdeclty]] = !DISubroutineType(types: ![[noargs:[^,)]*]])
20 // CHECK: ![[noargs]] = !{null}
21 // CHECK: !DISubprogram(name: "fastcallcc", {{.*}} type: ![[fastcallty:[^,]*]], {{.*}})
22 // CHECK: ![[fastcallty]] = !DISubroutineType(cc: DW_CC_BORLAND_msfastcall, types: ![[noargs]])
23 // CHECK: !DISubprogram(name: "stdcallcc", {{.*}} type: ![[stdcallty:[^,]*]], {{.*}})
24 // CHECK: ![[stdcallty]] = !DISubroutineType(cc: DW_CC_BORLAND_stdcall, types: ![[noargs]])
25 // CHECK: !DISubprogram(name: "vectorcallcc", {{.*}} type: ![[vectorcallty:[^,]*]], {{.*}})
26 // CHECK: ![[vectorcallty]] = !DISubroutineType(cc: DW_CC_LLVM_vectorcall, types: ![[noargs]])