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
105 lines
2.3 KiB
C++
105 lines
2.3 KiB
C++
// RUN: %clang_cc1 -std=c++1y -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -emit-llvm %s -o - | FileCheck %s
|
|
|
|
struct S {
|
|
S();
|
|
~S();
|
|
};
|
|
|
|
struct T {
|
|
T() noexcept;
|
|
~T();
|
|
int n;
|
|
};
|
|
|
|
// CHECK-LABEL: define{{.*}} void @_Z1fv(
|
|
void f() {
|
|
// CHECK: call void @_ZN1SC1Ev(
|
|
// CHECK: invoke void @__cxa_throw
|
|
//
|
|
// Ensure we call the lambda destructor here, and do not call the destructor
|
|
// for the capture.
|
|
// CHECK: landingpad
|
|
// CHECK-NOT: _ZN1SD
|
|
// CHECK: call void @"_ZZ1fvEN3$_0D1Ev"(
|
|
// CHECK-NOT: _ZN1SD
|
|
// CHECK: resume
|
|
[s = S()] {}, throw 0;
|
|
|
|
// CHECK: }
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} void @_Z1gv(
|
|
void g() {
|
|
// CHECK: call void @_ZN1SC1Ev(
|
|
// CHECK: invoke void @__cxa_throw
|
|
//
|
|
// Ensure we call the lambda destructor here, and do not call the destructor
|
|
// for the capture.
|
|
// CHECK: landingpad
|
|
// CHECK-NOT: @"_ZZ1gvEN3$_0D1Ev"(
|
|
// CHECK: call void @_ZN1SD1Ev(
|
|
// CHECK-NOT: @"_ZZ1gvEN3$_0D1Ev"(
|
|
// CHECK: resume
|
|
[s = S(), t = (throw 0, 1)] {};
|
|
|
|
// CHECK: }
|
|
}
|
|
|
|
void x() noexcept;
|
|
void y() noexcept;
|
|
|
|
// CHECK-LABEL: define{{.*}} void @_Z1hbb(
|
|
void h(bool b1, bool b2) {
|
|
// CHECK: {{.*}} = alloca i1,
|
|
// CHECK: %[[S_ISACTIVE:.*]] = alloca i1,
|
|
// CHECK: {{.*}} = alloca i1,
|
|
|
|
// lambda init: s and t, branch on b1
|
|
// CHECK: call void @_ZN1SC1Ev(
|
|
// CHECK: store i1 true, ptr %[[S_ISACTIVE]], align 1
|
|
// CHECK: call void @_ZN1TC1Ev(
|
|
// CHECK: br i1
|
|
|
|
// throw 1
|
|
// CHECK: invoke void @__cxa_throw
|
|
|
|
// completion of lambda init, branch on b2
|
|
// CHECK: store i32 42,
|
|
// CHECK: store i1 false, ptr %[[S_ISACTIVE]], align 1
|
|
// CHECK: br i1
|
|
|
|
// throw 2
|
|
// CHECK: invoke void @__cxa_throw
|
|
|
|
// end of full-expression
|
|
// CHECK: call void @_Z1xv(
|
|
// CHECK: call void @"_ZZ1hbbEN3$_0D1Ev"(
|
|
// CHECK: call void @_ZN1TD1Ev(
|
|
// CHECK: call void @_Z1yv(
|
|
// CHECK: ret void
|
|
|
|
// cleanups for throw 1
|
|
// CHECK: landingpad
|
|
// CHECK-NOT: @"_ZZ1hbbEN3$_0D1Ev"(
|
|
// CHECK: br
|
|
|
|
// cleanups for throw 2
|
|
// CHECK: landingpad
|
|
// CHECK: call void @"_ZZ1hbbEN3$_0D1Ev"(
|
|
// CHECK: br
|
|
|
|
// common cleanup code
|
|
// CHECK: call void @_ZN1TD1Ev(
|
|
// CHECK: load i1, ptr %[[S_ISACTIVE]],
|
|
// CHECK: br i1
|
|
|
|
// CHECK: call void @_ZN1SD1Ev(
|
|
// CHECK: br
|
|
|
|
// CHECK: resume
|
|
[s = S(), t = T().n, u = (b1 ? throw 1 : 42)] {}, (b2 ? throw 2 : 0), x();
|
|
y();
|
|
|
|
// CHECK: }
|
|
}
|