1 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s 2 // RUN: grep -e "objc_assign_weak" %t | grep -e "call" | count 6 3 // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s 4 // RUN: grep -e "objc_assign_weak" %t | grep -e "call" | count 6 5 6 __weak id* x; 7 id* __weak y; 8 id* __weak* z; 9 10 __weak id* a1[20]; 11 id* __weak a2[30]; 12 id** __weak a3[40]; 13 14 void foo (__weak id *param) { 15 *param = 0; 16 } 17 18 int main() 19 { 20 *x = 0; 21 *y = 0; 22 **z = 0; 23 24 a1[3] = 0; 25 a2[3] = 0; 26 a3[3][4] = 0; 27 } 28 29