1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc-only -fblocks -emit-llvm -o - %s | FileCheck %s 2*f4a2713aSLionel Sambuc// rdar://10150823 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@interface Test { 5*f4a2713aSLionel Sambuc@package 6*f4a2713aSLionel Sambuc Test ** __strong objects; 7*f4a2713aSLionel Sambuc} 8*f4a2713aSLionel Sambuc@end 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambucid newObject(); 11*f4a2713aSLionel Sambucvoid runWithBlock(void(^)(int i)); 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc@implementation Test 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc- (void)testWithObjectInBlock { 16*f4a2713aSLionel Sambuc Test **children = objects; 17*f4a2713aSLionel Sambuc runWithBlock(^(int i){ 18*f4a2713aSLionel Sambuc children[i] = newObject(); 19*f4a2713aSLionel Sambuc }); 20*f4a2713aSLionel Sambuc} 21*f4a2713aSLionel Sambuc 22*f4a2713aSLionel Sambuc@end 23*f4a2713aSLionel Sambuc// CHECK: call i8* @objc_assign_strongCast 24*f4a2713aSLionel Sambuc// CHECK: call i8* @objc_assign_strongCast 25*f4a2713aSLionel Sambuc 26