]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGenObjC/objc2-strong-cast-block-import.m
Vendor import of clang release_30 branch r142614:
[FreeBSD/FreeBSD.git] / test / CodeGenObjC / objc2-strong-cast-block-import.m
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc-only -fblocks  -emit-llvm -o - %s | FileCheck %s
2 // rdar://10150823
3
4 @interface Test {
5 @package
6     Test ** __strong objects;
7 }
8 @end
9
10 id newObject();
11 void runWithBlock(void(^)(int i));
12
13 @implementation Test
14
15 - (void)testWithObjectInBlock {
16     Test **children = objects;
17     runWithBlock(^(int i){
18         children[i] = newObject();
19     });
20 }
21
22 @end
23 // CHECK: call i8* @objc_assign_strongCast
24 // CHECK: call i8* @objc_assign_strongCast
25