xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjCXX/message-reference.mm (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s
2*f4a2713aSLionel Sambuc// rdar://8604515
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc@interface I {}
5*f4a2713aSLionel Sambuc-(unsigned int&)referenceCount;
6*f4a2713aSLionel Sambuc@end
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc@interface MyClass
9*f4a2713aSLionel Sambuc+(int)writeBlip:(I*)srcBlip;
10*f4a2713aSLionel Sambuc@end
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambuc@implementation MyClass
13*f4a2713aSLionel Sambuc+(int)writeBlip:(I*)srcBlip{
14*f4a2713aSLionel Sambuc  return ([srcBlip referenceCount] == 0);
15*f4a2713aSLionel Sambuc}
16*f4a2713aSLionel Sambuc@end
17*f4a2713aSLionel Sambuc
18*f4a2713aSLionel Sambuc// CHECK: [[T:%.*]] = call i32* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
19*f4a2713aSLionel Sambuc// CHECK: [[U:%.*]] = load i32* [[T]]
20*f4a2713aSLionel Sambuc// CHECK  [[V:%.*]] = icmp eq i32 [[U]], 0
21