31 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s2// RUN: grep objc_assign_global %t | count 33// RUN: grep objc_assign_strongCast %t | count 24// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s5// RUN: grep objc_assign_global %t | count 36// RUN: grep objc_assign_strongCast %t | count 27 8@interface A9@end10 11typedef struct s0 {12 A *a[4];13} T;14 15T g0;16 17void f0(id x) {18 g0.a[0] = x;19}20 21void f1(id x) {22 ((T*) &g0)->a[0] = x;23}24 25void f2(unsigned idx)26{27 id *keys;28 keys[idx] = 0;29}30 31