Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / lang / objc / self / main.m
blob5ec1d65d16cea8e4ee3f994877c33ebd172a64d5
1 #import <Foundation/Foundation.h>
3 @interface A : NSObject
5     int m_a;
7 -(id)init;
8 -(void)accessMember:(int)a;
9 +(void)accessStaticMember:(int)a;
10 @end
12 static int s_a = 5;
14 @implementation A
15 -(id)init
17     self = [super init];
18     
19     if (self)
20         m_a = 2;
22     return self;
25 -(void)accessMember:(int)a
27     m_a = a; // breakpoint 1
30 +(void)accessStaticMember:(int)a
32     s_a = a; // breakpoint 2
34 @end
36 int main()
38     NSAutoreleasePool *pool = [NSAutoreleasePool alloc];
39     A *my_a = [[A alloc] init];
40     
41     [my_a accessMember:3];
42     [A accessStaticMember:5];
43     
44     [pool release];