Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / lang / objc / ptr_refs / main.m
blobcebb64309177c95f6ff7772603f8056dbd24bdaf
1 #import <Foundation/Foundation.h>
3 @interface MyClass : NSObject {
4 };
5 -(void)test;
6 @end
8 @implementation MyClass
9 -(void)test {
10     printf("%p\n", self); // break here
12 @end
14 @interface MyOwner : NSObject {
15   @public id ownedThing; // should be id, to test <rdar://problem/31363513>
17 @end
19 @implementation MyOwner
20 @end
22 int main (int argc, char const *argv[]) {
23     @autoreleasepool {
24         MyOwner *owner = [[MyOwner alloc] init];
25         owner->ownedThing = [[MyClass alloc] init];
26         [(MyClass*)owner->ownedThing test];
27     }
28     return 0;