blob: b7cf98d88c662afdefb3e101970c996b6c81af7e [file] [log] [blame]
Fariborz Jahanian180ff3a2011-03-02 20:09:49 +00001// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
2// rdar://8604515
3
4@interface I {}
5-(unsigned int&)referenceCount;
6@end
7
8@interface MyClass
9+(int)writeBlip:(I*)srcBlip;
10@end
11
12@implementation MyClass
13+(int)writeBlip:(I*)srcBlip{
14 return ([srcBlip referenceCount] == 0);
15}
16@end
17
18// CHECK: [[T:%.*]] = call i32* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
19// CHECK: [[U:%.*]] = load i32* [[T]]
20// CHECK [[V:%.*]] = icmp eq i32 [[U]], 0