blob: 206ecb0c29e3fbca7f604d8b9aa6b9846af75129 [file] [log] [blame]
John McCalld1e40d52011-10-02 01:16:38 +00001// RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin10 -fobjc-fragile-abi -emit-llvm -o - %s | FileCheck %s
Fariborz Jahaniana7625142010-11-18 22:39:16 +00002// rdar://8681766
3
4@interface NSArray
5- (NSArray*) retain;
6- (void) release;
7@end
8
9void NSAssignArray(NSArray*& target, NSArray* newValue)
10{
11 if (target == newValue)
12 return;
13
14 NSArray* oldValue = target;
15
16 target = [newValue retain];
17
18 [oldValue release];
19}
20// CHECK: {{call.* @objc_assign_strongCast}}