John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin10 -fobjc-fragile-abi -emit-llvm -o - %s | FileCheck %s |
Fariborz Jahanian | a762514 | 2010-11-18 22:39:16 +0000 | [diff] [blame] | 2 | // rdar://8681766 |
| 3 | |
| 4 | @interface NSArray |
| 5 | - (NSArray*) retain; |
| 6 | - (void) release; |
| 7 | @end |
| 8 | |
| 9 | void 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}} |