John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc-only -fblocks -emit-llvm -o - %s | FileCheck %s |
Fariborz Jahanian | e3f8349 | 2011-09-23 18:57:30 +0000 | [diff] [blame] | 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 | |