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
90 lines
2.6 KiB
C++
90 lines
2.6 KiB
C++
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
|
|
|
|
class C {
|
|
public:
|
|
void simple_method() {}
|
|
|
|
void __cdecl cdecl_method() {}
|
|
|
|
void vararg_method(const char *fmt, ...) {}
|
|
|
|
static void static_method() {}
|
|
|
|
int a;
|
|
};
|
|
|
|
void call_simple_method() {
|
|
C instance;
|
|
|
|
instance.simple_method();
|
|
// Make sure that the call uses the right calling convention:
|
|
// CHECK: call x86_thiscallcc void @"?simple_method@C@@QAEXXZ"
|
|
// CHECK: ret
|
|
|
|
// Make sure that the definition uses the right calling convention:
|
|
// CHECK: define linkonce_odr dso_local x86_thiscallcc void @"?simple_method@C@@QAEXXZ"
|
|
// CHECK: ret
|
|
}
|
|
|
|
void call_cdecl_method() {
|
|
C instance;
|
|
instance.cdecl_method();
|
|
// Make sure that the call uses the right calling convention:
|
|
// CHECK: call void @"?cdecl_method@C@@QAAXXZ"
|
|
// CHECK: ret
|
|
|
|
// Make sure that the definition uses the right calling convention:
|
|
// CHECK: define linkonce_odr dso_local void @"?cdecl_method@C@@QAAXXZ"
|
|
// CHECK: ret
|
|
}
|
|
|
|
void call_vararg_method() {
|
|
C instance;
|
|
instance.vararg_method("Hello");
|
|
// Make sure that the call uses the right calling convention:
|
|
// CHECK: call void (ptr, ptr, ...) @"?vararg_method@C@@QAAXPBDZZ"
|
|
// CHECK: ret
|
|
|
|
// Make sure that the definition uses the right calling convention:
|
|
// CHECK: define linkonce_odr dso_local void @"?vararg_method@C@@QAAXPBDZZ"
|
|
}
|
|
|
|
void call_static_method() {
|
|
C::static_method();
|
|
// Make sure that the call uses the right calling convention:
|
|
// CHECK: call void @"?static_method@C@@SAXXZ"
|
|
// CHECK: ret
|
|
|
|
// Make sure that the definition uses the right calling convention:
|
|
// CHECK: define linkonce_odr dso_local void @"?static_method@C@@SAXXZ"
|
|
}
|
|
|
|
class Base {
|
|
public:
|
|
Base() {}
|
|
~Base() {}
|
|
};
|
|
|
|
class Child: public Base { };
|
|
|
|
void constructors() {
|
|
Child c;
|
|
// Make sure that the Base constructor call noundef in the Child constructor uses
|
|
// the right calling convention:
|
|
// CHECK: define linkonce_odr dso_local x86_thiscallcc noundef ptr @"??0Child@@QAE@XZ"
|
|
// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc noundef ptr @"??0Base@@QAE@XZ"
|
|
// CHECK: ret
|
|
|
|
// Make sure that the Base destructor call noundef in the Child denstructor uses
|
|
// the right calling convention:
|
|
// CHECK: define linkonce_odr dso_local x86_thiscallcc void @"??1Child@@QAE@XZ"
|
|
// CHECK: call x86_thiscallcc void @"??1Base@@QAE@XZ"
|
|
// CHECK: ret
|
|
|
|
// Make sure that the Base constructor definition uses the right CC:
|
|
// CHECK: define linkonce_odr dso_local x86_thiscallcc noundef ptr @"??0Base@@QAE@XZ"
|
|
|
|
// Make sure that the Base destructor definition uses the right CC:
|
|
// CHECK: define linkonce_odr dso_local x86_thiscallcc void @"??1Base@@QAE@XZ"
|
|
}
|