minix/external/bsd/llvm/dist/clang/test/CodeGenObjC/objc2-weak-assign.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

28 lines
635 B
Objective-C

// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
// RUN: grep -e "objc_assign_weak" %t | grep -e "call" | count 6
// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
// RUN: grep -e "objc_assign_weak" %t | grep -e "call" | count 6
__weak id* x;
id* __weak y;
id* __weak* z;
__weak id* a1[20];
id* __weak a2[30];
id** __weak a3[40];
void foo (__weak id *param) {
*param = 0;
}
int main()
{
*x = 0;
*y = 0;
**z = 0;
a1[3] = 0;
a2[3] = 0;
a3[3][4] = 0;
}