xref: /llvm-project/clang/test/CodeGenObjC/objc2-weak-compare.m (revision 12f78e740c5419f7d1fbcf8f2106e7a40cd1d6f7)
1// RUN: %clang_cc1 -Wno-error=return-type -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
2// RUN: %clang_cc1 -Wno-error=return-type -x objective-c++ -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
3
4@interface PBXTarget
5{
6
7PBXTarget * __weak _lastKnownTarget;
8PBXTarget * __weak _KnownTarget;
9PBXTarget * result;
10}
11- Meth;
12@end
13
14extern void foo(void);
15@implementation PBXTarget
16- Meth {
17	if (_lastKnownTarget != result)
18	 foo();
19	if (result != _lastKnownTarget)
20	 foo();
21
22 	if (_lastKnownTarget != _KnownTarget)
23	  foo();
24}
25
26@end
27