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
64 lines
2.2 KiB
Plaintext
64 lines
2.2 KiB
Plaintext
// RUN: cir-opt %s --verify-roundtrip | FileCheck %s
|
|
|
|
!s8i = !cir.int<s, 8>
|
|
!u8i = !cir.int<u, 8>
|
|
!void = !cir.void
|
|
!rec_E = !cir.struct<"E" padded {!u8i}>
|
|
|
|
module {
|
|
|
|
cir.global "private" constant external @_ZTI1E : !cir.ptr<!u8i>
|
|
|
|
// A CIRGen-style catch-init helper thunk: takes (dest, src) and returns void.
|
|
// `cir.construct_catch_param` references this function via its `copy_fn`
|
|
// attribute; the verifier checks the symbol resolves and matches the
|
|
// (T*, T*) -> void signature.
|
|
cir.func linkonce_odr hidden @__clang_cir_catch_copy__ZTS1E(
|
|
%arg0: !cir.ptr<!rec_E>, %arg1: !cir.ptr<!rec_E>)
|
|
attributes {cir.eh.catch_copy_thunk} {
|
|
cir.return
|
|
}
|
|
|
|
// CHECK: cir.func linkonce_odr hidden @__clang_cir_catch_copy__ZTS1E(
|
|
// CHECK-SAME: attributes {cir.eh.catch_copy_thunk}
|
|
// CHECK: cir.return
|
|
// CHECK: }
|
|
|
|
// Positive shape: a `cir.try` whose typed catch handler region begins with
|
|
// `cir.construct_catch_param` (referring to an alloca defined in the
|
|
// enclosing scope) followed by `cir.begin_catch`.
|
|
cir.func @construct_catch_param_basic() {
|
|
cir.scope {
|
|
%param = cir.alloca !rec_E, !cir.ptr<!rec_E>, ["e"] {alignment = 1 : i64}
|
|
cir.try {
|
|
cir.yield
|
|
} catch [type #cir.global_view<@_ZTI1E> : !cir.ptr<!u8i>]
|
|
(%eh_token: !cir.eh_token) {
|
|
cir.construct_catch_param non_trivial_copy %eh_token to %param
|
|
using @__clang_cir_catch_copy__ZTS1E : !cir.ptr<!rec_E>
|
|
%catch_token, %exn_ptr = cir.begin_catch %eh_token
|
|
: !cir.eh_token -> (!cir.catch_token, !cir.ptr<!void>)
|
|
cir.cleanup.scope {
|
|
cir.yield
|
|
} cleanup eh {
|
|
cir.end_catch %catch_token : !cir.catch_token
|
|
cir.yield
|
|
}
|
|
cir.yield
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
// CHECK-LABEL: cir.func @construct_catch_param_basic()
|
|
// CHECK: %[[E:.*]] = cir.alloca !rec_E, !cir.ptr<!rec_E>, ["e"]
|
|
// CHECK: cir.try {
|
|
// CHECK: cir.yield
|
|
// CHECK: } catch [type #cir.global_view<@_ZTI1E> : !cir.ptr<!u8i>]
|
|
// CHECK-SAME: (%[[EH:.*]]: !cir.eh_token) {
|
|
// CHECK: cir.construct_catch_param non_trivial_copy %[[EH]] to %[[E]]
|
|
// CHECK-SAME: using @__clang_cir_catch_copy__ZTS1E : !cir.ptr<!rec_E>
|
|
// CHECK: cir.begin_catch %[[EH]]
|
|
|
|
}
|