1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s 2*f4a2713aSLionel Sambuc// rdar://8681766 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@interface NSArray 5*f4a2713aSLionel Sambuc- (NSArray*) retain; 6*f4a2713aSLionel Sambuc- (void) release; 7*f4a2713aSLionel Sambuc@end 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambucvoid NSAssignArray(NSArray*& target, NSArray* newValue) 10*f4a2713aSLionel Sambuc{ 11*f4a2713aSLionel Sambuc if (target == newValue) 12*f4a2713aSLionel Sambuc return; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc NSArray* oldValue = target; 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc target = [newValue retain]; 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc [oldValue release]; 19*f4a2713aSLionel Sambuc} 20*f4a2713aSLionel Sambuc// CHECK: {{call.* @objc_assign_strongCast}} 21