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
77 lines
1.9 KiB
Objective-C
77 lines
1.9 KiB
Objective-C
// RUN: %clang_cc1 -emit-llvm -triple i686-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -o - %s -O2 | FileCheck %s
|
|
|
|
@interface MyClass
|
|
{
|
|
}
|
|
- (void)method;
|
|
@end
|
|
|
|
@implementation MyClass
|
|
|
|
// CHECK: define internal void @"\01-[MyClass method]"
|
|
- (void)method
|
|
{
|
|
// CHECK: call i32 @objc_sync_enter
|
|
// CHECK: call void @objc_exception_try_enter
|
|
// CHECK: call i32 @_setjmp
|
|
@synchronized(self) {
|
|
}
|
|
}
|
|
|
|
@end
|
|
|
|
// CHECK-LABEL: define{{.*}} void @foo(
|
|
void foo(id a) {
|
|
// CHECK: [[A:%.*]] = alloca ptr
|
|
// CHECK: [[SYNC:%.*]] = alloca ptr
|
|
|
|
// CHECK: store ptr [[AVAL:%.*]], ptr [[A]]
|
|
// CHECK-NEXT: call i32 @objc_sync_enter(ptr [[AVAL]])
|
|
// CHECK-NEXT: store ptr [[AVAL]], ptr [[SYNC]]
|
|
// CHECK-NEXT: call void @objc_exception_try_enter
|
|
// CHECK: call i32 @_setjmp
|
|
@synchronized(a) {
|
|
// This is unreachable, but the optimizers can't know that.
|
|
// CHECK: call void asm sideeffect "", "=*m,=*m,=*m"(ptr nonnull elementtype(ptr) [[A]], ptr nonnull elementtype(ptr) [[SYNC]]
|
|
// CHECK: call i32 @objc_sync_exit
|
|
// CHECK: call ptr @objc_exception_extract
|
|
// CHECK: call void @objc_exception_throw
|
|
// CHECK: unreachable
|
|
|
|
// CHECK: call void @objc_exception_try_exit
|
|
// CHECK-NEXT: call i32 @objc_sync_exit
|
|
// CHECK: ret void
|
|
return;
|
|
}
|
|
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} i32 @f0(
|
|
int f0(id a) {
|
|
// We can optimize the ret to a constant as we can figure out
|
|
// that x isn't stored to within the synchronized block.
|
|
|
|
// CHECK: [[X:%.*]] = alloca i32
|
|
// CHECK: store i32 1, ptr [[X]]
|
|
int x = 0;
|
|
@synchronized((x++, a)) {
|
|
}
|
|
|
|
// CHECK: ret i32 1
|
|
return x;
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} void @f1(
|
|
void f1(id a) {
|
|
// Check that the return doesn't go through the cleanup.
|
|
extern void opaque(void);
|
|
opaque();
|
|
|
|
// CHECK: call void @opaque()
|
|
// CHECK-NEXT: ret void
|
|
|
|
@synchronized(({ return; }), a) {
|
|
return;
|
|
}
|
|
}
|