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
82 lines
3.0 KiB
Objective-C
82 lines
3.0 KiB
Objective-C
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -fblocks -fexceptions -fobjc-exceptions -O2 -disable-llvm-passes -o - %s | FileCheck %s
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -fblocks -fexceptions -fobjc-exceptions -disable-llvm-passes -o - %s | FileCheck -check-prefix=NO-METADATA %s
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -fblocks -fexceptions -fobjc-exceptions -O2 -disable-llvm-passes -o - %s -fobjc-arc-exceptions | FileCheck -check-prefix=NO-METADATA %s
|
|
|
|
// The front-end should emit clang.arc.no_objc_arc_exceptions in -fobjc-arc-exceptions
|
|
// mode when optimization is enabled, and not otherwise.
|
|
|
|
void thrower(void);
|
|
void not(void) __attribute__((nothrow));
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test0(
|
|
// CHECK: call void @thrower(), !clang.arc.no_objc_arc_exceptions !
|
|
// CHECK: call void @not() [[NUW:#[0-9]+]], !clang.arc.no_objc_arc_exceptions !
|
|
// NO-METADATA-LABEL: define{{.*}} void @test0(
|
|
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
|
|
// NO-METADATA: }
|
|
void test0(void) {
|
|
thrower();
|
|
not();
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test1(
|
|
// CHECK: call void @thrower(), !clang.arc.no_objc_arc_exceptions !
|
|
// CHECK: call void @not() [[NUW]], !clang.arc.no_objc_arc_exceptions !
|
|
// NO-METADATA-LABEL: define{{.*}} void @test1(
|
|
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
|
|
// NO-METADATA: }
|
|
void test1(id x) {
|
|
id y = x;
|
|
thrower();
|
|
not();
|
|
}
|
|
|
|
void NSLog(id, ...);
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test2(
|
|
// CHECK: invoke void (ptr, ...) @NSLog(ptr noundef @_unnamed_cfstring_, ptr noundef %{{.*}})
|
|
// CHECK: to label %{{.*}} unwind label %{{.*}}, !clang.arc.no_objc_arc_exceptions !
|
|
// NO-METADATA-LABEL: define{{.*}} void @test2(
|
|
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
|
|
// NO-METADATA: }
|
|
void test2(void) {
|
|
@autoreleasepool {
|
|
__attribute__((__blocks__(byref))) int x;
|
|
^{ (void)x; };
|
|
NSLog(@"Address of x outside of block: %p", &x);
|
|
}
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test3(
|
|
// CHECK: invoke void %{{.*}}(ptr noundef %{{.*}})
|
|
// CHECK: to label %{{.*}} unwind label %{{.*}}, !clang.arc.no_objc_arc_exceptions !
|
|
// NO-METADATA-LABEL: define{{.*}} void @test3(
|
|
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
|
|
// NO-METADATA: }
|
|
void test3(void) {
|
|
@autoreleasepool {
|
|
__attribute__((__blocks__(byref))) int x;
|
|
^{
|
|
NSLog(@"Address of x in non-assigned block: %p", &x);
|
|
}();
|
|
}
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test4(
|
|
// CHECK: invoke void %{{.*}}(ptr noundef %{{.*}})
|
|
// CHECK: to label %{{.*}} unwind label %{{.*}}, !clang.arc.no_objc_arc_exceptions !
|
|
// NO-METADATA-LABEL: define{{.*}} void @test4(
|
|
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
|
|
// NO-METADATA: }
|
|
void test4(void) {
|
|
@autoreleasepool {
|
|
__attribute__((__blocks__(byref))) int x;
|
|
void (^b)(void) = ^{
|
|
NSLog(@"Address of x in assigned block: %p", &x);
|
|
};
|
|
b();
|
|
}
|
|
}
|
|
|
|
// CHECK: attributes [[NUW]] = { nounwind }
|