aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/python_api/objc_type/main.m
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/python_api/objc_type/main.m')
-rw-r--r--packages/Python/lldbsuite/test/python_api/objc_type/main.m52
1 files changed, 52 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/python_api/objc_type/main.m b/packages/Python/lldbsuite/test/python_api/objc_type/main.m
new file mode 100644
index 000000000000..6ae54ade09ac
--- /dev/null
+++ b/packages/Python/lldbsuite/test/python_api/objc_type/main.m
@@ -0,0 +1,52 @@
+//===-- main.m ------------------------------------------------*- ObjC -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#import <Foundation/Foundation.h>
+
+@interface Foo: NSObject
+{}
+- (id) init;
+@end
+
+@interface Bar: Foo
+{
+ int _iVar;
+}
+- (id) init;
+@end
+
+@implementation Foo
+
+- (id) init
+{
+ self = [super init];
+ return self;
+}
+
+@end
+
+@implementation Bar
+
+- (id) init
+{
+ self = [super init];
+ if (self)
+ self->_iVar = 5;
+ return self;
+}
+
+@end
+
+int main()
+{
+ Bar* aBar = [Bar new];
+ id nothing = [aBar noSuchSelector]; // Break at this line
+ return 0;
+}
+