CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
81 lines
1.8 KiB
C++
81 lines
1.8 KiB
C++
// Build with "cl.exe /Zi /GR- /GS- -EHs-c- every-function.cpp /link /debug /nodefaultlib /incremental:no /entry:main"
|
|
// Getting functions with the correct calling conventions requires building in x86.
|
|
|
|
// clang-format off
|
|
void *__purecall = 0;
|
|
|
|
void __cdecl operator delete(void *,unsigned int) {}
|
|
void __cdecl operator delete(void *,unsigned __int64) {}
|
|
|
|
// All calling conventions that appear in normal code.
|
|
int __cdecl cc_cdecl() { return 42; }
|
|
int __stdcall cc_stdcall() { return 42; }
|
|
int __fastcall cc_fastcall() { return 42; }
|
|
int __vectorcall cc_vectorcall() { return 42; }
|
|
|
|
|
|
struct Struct {
|
|
Struct() {} // constructor
|
|
|
|
int __thiscall cc_thiscall() { return 42; }
|
|
|
|
void M() { }
|
|
void CM() const { }
|
|
void VM() volatile { }
|
|
void CVM() const volatile { }
|
|
};
|
|
|
|
int builtin_one_param(int x) { return 42; }
|
|
int builtin_two_params(int x, char y) { return 42; }
|
|
|
|
void struct_one_param(Struct S) { }
|
|
|
|
void modified_builtin_param(const int X) { }
|
|
void modified_struct_param(const Struct S) { }
|
|
|
|
void pointer_builtin_param(int *X) { }
|
|
void pointer_struct_param(Struct *S) { }
|
|
|
|
|
|
void modified_pointer_builtin_param(const int *X) { }
|
|
void modified_pointer_struct_param(const Struct *S) { }
|
|
|
|
Struct rvo() { return Struct(); }
|
|
|
|
struct Base1 {
|
|
virtual ~Base1() {}
|
|
};
|
|
|
|
struct Base2 : public virtual Base1 { };
|
|
|
|
struct Derived : public virtual Base1, public Base2 {
|
|
};
|
|
|
|
|
|
int main() {
|
|
cc_cdecl();
|
|
cc_stdcall();
|
|
cc_fastcall();
|
|
Struct().cc_thiscall();
|
|
cc_vectorcall();
|
|
|
|
builtin_one_param(42);
|
|
builtin_two_params(42, 'x');
|
|
struct_one_param(Struct{});
|
|
|
|
modified_builtin_param(42);
|
|
modified_struct_param(Struct());
|
|
|
|
pointer_builtin_param(nullptr);
|
|
pointer_struct_param(nullptr);
|
|
|
|
|
|
modified_pointer_builtin_param(nullptr);
|
|
modified_pointer_struct_param(nullptr);
|
|
|
|
Struct S = rvo();
|
|
|
|
Derived D;
|
|
return 42;
|
|
}
|