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
94 lines
3.1 KiB
C
94 lines
3.1 KiB
C
// Tests that we assign appropriate identifiers to indirect calls and targets.
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux -fexperimental-call-graph-section \
|
|
// RUN: -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,ITANIUM %s
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fexperimental-call-graph-section \
|
|
// RUN: -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,MS %s
|
|
|
|
// CHECK-LABEL: define {{(dso_local)?}} void @foo(
|
|
// CHECK-SAME: {{.*}} !type [[F_TVOID:![0-9]+]]
|
|
void foo() {
|
|
}
|
|
|
|
// CHECK-LABEL: define {{(dso_local)?}} void @bar(
|
|
// CHECK-SAME: {{.*}} !type [[F_TVOID]]
|
|
void bar() {
|
|
void (*fp)() = foo;
|
|
// ITANIUM: call {{.*}}, !callee_type [[F_TVOID_CT:![0-9]+]]
|
|
// MS: call {{.*}}, !callee_type [[F_TVOID_CT:![0-9]+]]
|
|
fp();
|
|
}
|
|
|
|
// CHECK-LABEL: define {{(dso_local)?}} i32 @baz(
|
|
// CHECK-SAME: {{.*}} !type [[F_TPRIMITIVE:![0-9]+]]
|
|
int baz(char a, float b, double c) {
|
|
return 1;
|
|
}
|
|
|
|
// CHECK-LABEL: define {{(dso_local)?}} ptr @qux(
|
|
// CHECK-SAME: {{.*}} !type [[F_TPTR:![0-9]+]]
|
|
int *qux(char *a, float *b, double *c) {
|
|
return 0;
|
|
}
|
|
|
|
// CHECK-LABEL: define {{(dso_local)?}} void @corge(
|
|
// CHECK-SAME: {{.*}} !type [[F_TVOID]]
|
|
void corge() {
|
|
int (*fp_baz)(char, float, double) = baz;
|
|
// CHECK: call i32 {{.*}}, !callee_type [[F_TPRIMITIVE_CT:![0-9]+]]
|
|
fp_baz('a', .0f, .0);
|
|
|
|
int *(*fp_qux)(char *, float *, double *) = qux;
|
|
// CHECK: call ptr {{.*}}, !callee_type [[F_TPTR_CT:![0-9]+]]
|
|
fp_qux(0, 0, 0);
|
|
}
|
|
|
|
struct st1 {
|
|
int *(*fp)(char *, float *, double *);
|
|
};
|
|
|
|
struct st2 {
|
|
struct st1 m;
|
|
};
|
|
|
|
// CHECK-LABEL: define {{(dso_local)?}} void @stparam(
|
|
// CHECK-SAME: {{.*}} !type [[F_TSTRUCT:![0-9]+]]
|
|
void stparam(struct st2 a, struct st2 *b) {}
|
|
|
|
// CHECK-LABEL: define {{(dso_local)?}} void @stf(
|
|
// CHECK-SAME: {{.*}} !type [[F_TVOID]]
|
|
void stf() {
|
|
struct st1 St1;
|
|
St1.fp = qux;
|
|
// CHECK: call ptr {{.*}}, !callee_type [[F_TPTR_CT:![0-9]+]]
|
|
St1.fp(0, 0, 0);
|
|
|
|
struct st2 St2;
|
|
St2.m.fp = qux;
|
|
// CHECK: call ptr {{.*}}, !callee_type [[F_TPTR_CT:![0-9]+]]
|
|
St2.m.fp(0, 0, 0);
|
|
|
|
// CHECK: call void {{.*}}, !callee_type [[F_TSTRUCT_CT:![0-9]+]]
|
|
void (*fp_stparam)(struct st2, struct st2 *) = stparam;
|
|
fp_stparam(St2, &St2);
|
|
}
|
|
|
|
// ITANIUM: [[F_TVOID]] = !{i64 0, !"_ZTSFvE.generalized"}
|
|
// ITANIUM: [[F_TVOID_CT]] = !{[[F_TVOID:![0-9]+]]}
|
|
// ITANIUM: [[F_TPRIMITIVE]] = !{i64 0, !"_ZTSFicfdE.generalized"}
|
|
// ITANIUM: [[F_TPTR]] = !{i64 0, !"_ZTSFPiPcPfPdE.generalized"}
|
|
// ITANIUM: [[F_TPRIMITIVE_CT]] = !{[[F_TPRIMITIVE:![0-9]+]]}
|
|
// ITANIUM: [[F_TPTR_CT]] = !{[[F_TPTR:![0-9]+]]}
|
|
// ITANIUM: [[F_TSTRUCT]] = !{i64 0, !"_ZTSFv3st2PS_E.generalized"}
|
|
// ITANIUM: [[F_TSTRUCT_CT]] = !{[[F_TSTRUCT:![0-9]+]]}
|
|
|
|
// MS: [[F_TVOID]] = !{i64 0, !"?6AX@Z.generalized"}
|
|
// MS: [[F_TVOID_CT]] = !{[[F_TVOID:![0-9]+]]}
|
|
// MS: [[F_TPRIMITIVE]] = !{i64 0, !"?6AHDMN@Z.generalized"}
|
|
// MS: [[F_TPTR]] = !{i64 0, !"?6APEAHPEADPEAMPEAN@Z.generalized"}
|
|
// MS: [[F_TPRIMITIVE_CT]] = !{[[F_TPRIMITIVE:![0-9]+]]}
|
|
// MS: [[F_TPTR_CT]] = !{[[F_TPTR:![0-9]+]]}
|
|
// MS: [[F_TSTRUCT]] = !{i64 0, !"?6AXUst2@@PEAU0@@Z.generalized"}
|
|
// MS: [[F_TSTRUCT_CT]] = !{[[F_TSTRUCT:![0-9]+]]}
|