[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / DebugInfo / PDB / Inputs / every-function.cpp
blob71e8f08f4ce8347e1c1d248c643e31d527147d7b
1 // Build with "cl.exe /Zi /GR- /GS- -EHs-c- every-function.cpp /link /debug /nodefaultlib /incremental:no /entry:main"
2 // Getting functions with the correct calling conventions requires building in x86.
4 // clang-format off
5 void *__purecall = 0;
7 void __cdecl operator delete(void *,unsigned int) {}
8 void __cdecl operator delete(void *,unsigned __int64) {}
10 // All calling conventions that appear in normal code.
11 int __cdecl cc_cdecl() { return 42; }
12 int __stdcall cc_stdcall() { return 42; }
13 int __fastcall cc_fastcall() { return 42; }
14 int __vectorcall cc_vectorcall() { return 42; }
17 struct Struct {
18 Struct() {} // constructor
20 int __thiscall cc_thiscall() { return 42; }
22 void M() { }
23 void CM() const { }
24 void VM() volatile { }
25 void CVM() const volatile { }
28 int builtin_one_param(int x) { return 42; }
29 int builtin_two_params(int x, char y) { return 42; }
31 void struct_one_param(Struct S) { }
33 void modified_builtin_param(const int X) { }
34 void modified_struct_param(const Struct S) { }
36 void pointer_builtin_param(int *X) { }
37 void pointer_struct_param(Struct *S) { }
40 void modified_pointer_builtin_param(const int *X) { }
41 void modified_pointer_struct_param(const Struct *S) { }
43 Struct rvo() { return Struct(); }
45 struct Base1 {
46 virtual ~Base1() {}
49 struct Base2 : public virtual Base1 { };
51 struct Derived : public virtual Base1, public Base2 {
55 int main() {
56 cc_cdecl();
57 cc_stdcall();
58 cc_fastcall();
59 Struct().cc_thiscall();
60 cc_vectorcall();
62 builtin_one_param(42);
63 builtin_two_params(42, 'x');
64 struct_one_param(Struct{});
66 modified_builtin_param(42);
67 modified_struct_param(Struct());
69 pointer_builtin_param(nullptr);
70 pointer_struct_param(nullptr);
73 modified_pointer_builtin_param(nullptr);
74 modified_pointer_struct_param(nullptr);
76 Struct S = rvo();
78 Derived D;
79 return 42;