Files
TheRock/compiler/amd-llvm/clang/test/CodeGenObjCXX/arc-exceptions-seh.mm
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

72 lines
2.9 KiB
XML

// RUN: %clang_cc1 -O0 -triple x86_64-pc-windows-msvc -emit-llvm -fobjc-arc -fexceptions -fobjc-exceptions -fobjc-arc-exceptions -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-O0
// RUN: %clang_cc1 -O2 -triple x86_64-pc-windows-msvc -emit-llvm -fobjc-arc -fexceptions -fobjc-exceptions -fobjc-arc-exceptions -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-O2
// WinEH requires funclet tokens on nounwind intrinsics if they can lower to
// regular function calls in the course of IR transformations.
//
// This is the case for ObjC ARC runtime intrinsics. Test that clang emits the
// funclet tokens for llvm.objc.* calls inside catch- and cleanup-pads and that
// they refer to their pad's SSA value.
void do_something();
void may_throw(id);
void try_catch_with_objc_intrinsic() {
id ex;
@try {
may_throw(ex);
} @catch (id ex_caught) {
do_something();
may_throw(ex_caught);
}
}
// CHECK-LABEL: try_catch_with_objc_intrinsic
//
// CHECK: catch.dispatch:
// CHECK-NEXT: [[CATCHSWITCH:%[0-9]+]] = catchswitch within none [label %catch]
// CHECK-O0: unwind label %[[CLEANUP1:.*]]
// CHECK-O2: unwind to caller
//
// All calls within a catchpad must have funclet tokens that refer to it:
// CHECK: catch:
// CHECK-NEXT: [[CATCHPAD:%[0-9]+]] = catchpad within [[CATCHSWITCH]]
// CHECK: call
// CHECK: @llvm.objc.retain
// CHECK: [ "funclet"(token [[CATCHPAD]]) ]
// CHECK: invoke
// CHECK: do_something
// CHECK: [ "funclet"(token [[CATCHPAD]]) ]
// CHECK: unwind label %[[CLEANUP2:.*]]
// CHECK: invoke
// CHECK: may_throw
// CHECK: [ "funclet"(token [[CATCHPAD]]) ]
// CHECK: unwind label %[[CLEANUP2]]
// CHECK: call
// CHECK-O0: @llvm.objc.storeStrong
// CHECK-O2: @llvm.objc.release
// CHECK: [ "funclet"(token [[CATCHPAD]]) ]
// CHECK-O0: catchret from [[CATCHPAD]] to label %catchret.dest
// CHECK-O2: catchret from [[CATCHPAD]] to label %eh.cont
//
// In debug mode, this block exists and it's empty:
// CHECK-O0: catchret.dest:
// CHECK-O0-NEXT: br label %eh.cont
//
// CHECK: [[CLEANUP2]]:
// CHECK-NEXT: [[CLEANUPPAD2:%[0-9]+]] = cleanuppad within [[CATCHPAD]]
// CHECK: call
// CHECK-O0: @llvm.objc.storeStrong
// CHECK-O2: @llvm.objc.release
// CHECK: [ "funclet"(token [[CLEANUPPAD2]]) ]
// CHECK: cleanupret from [[CLEANUPPAD2]]
// CHECK-O0: unwind label %[[CLEANUP1]]
// CHECK-O2: unwind to caller
//
// CHECK-O0: [[CLEANUP1]]:
// CHECK-O0-NEXT: [[CLEANUPPAD1:%[0-9]+]] = cleanuppad within none
// CHECK-O0: call
// CHECK-O0: @llvm.objc.storeStrong
// CHECK-O0: [ "funclet"(token [[CLEANUPPAD1]]) ]
// CHECK-O0: cleanupret from [[CLEANUPPAD1]] unwind to caller