summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-10-23 21:15:20 +0000
committerEnrico Granata <egranata@apple.com>2014-10-23 21:15:20 +0000
commit249d639786440747685b00e1a06ed1dcd69d052c (patch)
tree17bf1abc91cf48ef7327b0d165417bb9fbb8f20b /lldb/test/python_api
parentdfbb5cddb430f473040859b147caa0810216f559 (diff)
downloadbcm5719-llvm-249d639786440747685b00e1a06ed1dcd69d052c.tar.gz
bcm5719-llvm-249d639786440747685b00e1a06ed1dcd69d052c.zip
Fix a problem where an SBType was advertising its static type class even though a dynamic type was available. Solves rdar://18744420
llvm-svn: 220511
Diffstat (limited to 'lldb/test/python_api')
-rw-r--r--lldb/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py3
-rw-r--r--lldb/test/python_api/sbtype_typeclass/main.m34
2 files changed, 37 insertions, 0 deletions
diff --git a/lldb/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py b/lldb/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py
new file mode 100644
index 00000000000..a70d2ca7414
--- /dev/null
+++ b/lldb/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py
@@ -0,0 +1,3 @@
+import lldbinline
+
+lldbinline.MakeInlineTest(__file__, globals())
diff --git a/lldb/test/python_api/sbtype_typeclass/main.m b/lldb/test/python_api/sbtype_typeclass/main.m
new file mode 100644
index 00000000000..599d36107f4
--- /dev/null
+++ b/lldb/test/python_api/sbtype_typeclass/main.m
@@ -0,0 +1,34 @@
+//===-- main.m --------------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+#import <Cocoa/Cocoa.h>
+
+@interface ThisClassTestsThings : NSObject
+@end
+
+@implementation ThisClassTestsThings
+- (int)doSomething {
+
+ id s = self;
+ NSLog(@"%@",s); //% s = self.frame().FindVariable("s"); s.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
+ //% s_type = s.GetType()
+ //% typeClass = s_type.GetTypeClass()
+ //% condition = (typeClass == lldb.eTypeClassClass) or (typeClass ==lldb.eTypeClassObjCObject) or (typeClass == lldb.eTypeClassObjCInterface) or (typeClass == lldb.eTypeClassObjCObjectPointer) or (typeClass == lldb.eTypeClassPointer)
+ //% self.assertTrue(condition, "s has the wrong TypeClass")
+ return 0;
+}
+- (id)init {
+ return (self = [super init]);
+}
+@end
+
+
+int main (int argc, char const *argv[])
+{
+ return [[[ThisClassTestsThings alloc] init] doSomething];
+}
OpenPOWER on IntegriCloud