aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/objc2-weak-compare.m
blob: 8cba1a9860942429a0421628468c7c629464c038 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s

@interface PBXTarget 
{

PBXTarget * __weak _lastKnownTarget;
PBXTarget * __weak _KnownTarget;
PBXTarget * result;
}
- Meth;
@end

extern void foo();
@implementation PBXTarget
- Meth {
	if (_lastKnownTarget != result)
	 foo();
	if (result != _lastKnownTarget)
	 foo();

 	if (_lastKnownTarget != _KnownTarget)
	  foo();
}

@end