Debian Codegraph @

clang/test/CodeGenObjCXX/refence-assign-write-barrier.mm

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