blob: 70548570266cfceb98731911090a4c708b438727 [file] [log] [blame]
Devang Patel1ebb6f292011-05-24 00:22:40 +00001// RUN: %clang_cc1 -masm-verbose -S -fblocks -g -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-dispatch-method=mixed %s -o - | FileCheck %s
2
3//Radar 9279956
4//CHECK: ## DW_OP_deref
5//CHECK-NEXT: ## DW_OP_plus_uconst
6
7typedef unsigned int NSUInteger;
8
9@protocol NSObject
10@end
11
12@interface NSObject <NSObject>
13- (id)init;
14+ (id)alloc;
15@end
16
17@interface NSDictionary : NSObject
18- (NSUInteger)count;
19@end
20
21@interface NSMutableDictionary : NSDictionary
22@end
23
24@interface A : NSObject {
25@public
26 int ivar;
27}
28@end
29
30static void run(void (^block)(void))
31{
32 block();
33}
34
35@implementation A
36
37- (id)init
38{
39 if ((self = [super init])) {
40 run(^{
41 NSMutableDictionary *d = [[NSMutableDictionary alloc] init];
42 ivar = 42 + (int)[d count];
43 });
44 }
45 return self;
46}
47
48@end
49
50int main()
51{
52 A *a = [[A alloc] init];
53 return 0;
54}