llvm-project/clang/test/CodeGenObjC/objc2-weak-compare.m

25 lines
386 B
Mathematica
Raw Normal View History

// RUN: clang -cc1 -triple i386-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
@interface PBXTarget
{
PBXTarget * __weak _lastKnownTarget;
PBXTarget * __weak _KnownTarget;
PBXTarget * result;
}
- Meth;
@end
@implementation PBXTarget
- Meth {
if (_lastKnownTarget != result)
foo();
if (result != _lastKnownTarget)
foo();
if (_lastKnownTarget != _KnownTarget)
foo();
}
@end