1 // RUN: %clang_cc1 %s -emit-llvm -o - -fobjc-gc -fblocks -triple i386-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 | FileCheck %s --check-prefix=CHECK --check-prefix=OBJC
2 // RUN: %clang_cc1 -x objective-c++ %s -emit-llvm -o - -fobjc-gc -fblocks -triple i386-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 | FileCheck %s --check-prefix=CHECK --check-prefix=OBJCXX
4 // OBJC-LABEL: define{{.*}} void @test1(
5 // OBJCXX-LABEL: define{{.*}} void @_Z5test1P12NSDictionary(
7 // CHECK-LABEL: define linkonce_odr hidden void @__copy_helper_block_
8 // CHECK: call void @_Block_object_assign(
10 // CHECK-LABEL: define linkonce_odr hidden void @__destroy_helper_block_
11 // CHECK: call void @_Block_object_dispose(
13 // OBJC-LABEL: define{{.*}} void @foo(
14 // OBJCXX-LABEL: define{{.*}} void @_Z3foov(
15 // CHECK: call ptr @objc_read_weak(
16 // CHECK: call ptr @objc_assign_weak(
17 // CHECK: call void @_Block_object_dispose(
19 // OBJC-LABEL: define{{.*}} void @test2(
20 // OBJCXX-LABEL: define{{.*}} void @_Z5test2v(
21 // CHECK: call ptr @objc_assign_weak(
22 // CHECK: call void @_Block_object_dispose(
24 // CHECK-LABEL: define linkonce_odr hidden void @__copy_helper_block_
25 // CHECK: call void @_Block_object_assign(
27 // CHECK-LABEL: define linkonce_odr hidden void @__destroy_helper_block_
28 // CHECK: call void @_Block_object_dispose(
30 @interface NSDictionary @end
32 void test1(NSDictionary * dict) {
40 __block __weak D *weakSelf;
47 void (^__weak b)(void);