| 1 |
// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s |
| 2 |
|
| 3 |
@interface I {} |
| 4 |
-(unsigned int&)referenceCount; |
| 5 |
@end |
| 6 |
|
| 7 |
@interface MyClass |
| 8 |
+(int)writeBlip:(I*)srcBlip; |
| 9 |
@end |
| 10 |
|
| 11 |
@implementation MyClass |
| 12 |
+(int)writeBlip:(I*)srcBlip{ |
| 13 |
return ([srcBlip referenceCount] == 0); |
| 14 |
} |
| 15 |
@end |
| 16 |
|
| 17 |
// CHECK: [[T:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @objc_msgSend |
| 18 |
// CHECK: [[U:%.*]] = load i32, ptr [[T]] |
| 19 |
// CHECK: [[V:%.*]] = icmp eq i32 [[U]], 0 |