Skip to content

Commit 86145a8

Browse files
committed
DWARFImporter: Add a non-working test for Objective-C properties.
apple-llvm-split-commit: 2a3be5706d53efe607dadf7ed4b47ee29f881732 apple-llvm-split-dir: lldb/
1 parent 7a49a6c commit 86145a8

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

lldb/packages/Python/lldbsuite/test/lang/swift/dwarfimporter/Objective-C/Inputs/objc-header.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
@protocol ObjCProtocol <WithName>
99
@end
1010

11-
@interface ObjCClass : NSObject {
12-
}
11+
@interface ObjCClass : NSObject
12+
@property (readonly) int number;
1313
- (instancetype)init;
1414
@end
1515

lldb/packages/Python/lldbsuite/test/lang/swift/dwarfimporter/Objective-C/TestSwiftDWARFImporterObjC.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ def test_dwarf_importer(self):
5151
num_children=0)
5252
self.expect("target var obj", substrs=["ObjCClass",
5353
"private_ivar", "42"])
54-
self.expect("target var swiftChild", substrs=["ObjCClass",
55-
"private_ivar", "42"])
54+
# FIXME: This triggers an assertion in ClangImporter:
55+
# "ObjC property without getter"
56+
#self.expect("target var swiftChild", substrs=["ObjCClass",
57+
# "private_ivar", "42"])
5658
# This is a Clang type, since Clang doesn't generate DWARF for protocols.
5759
self.expect("target var -d no-dyn proto", substrs=["(id)", "proto"])
5860
# This is a Swift type.

lldb/packages/Python/lldbsuite/test/lang/swift/dwarfimporter/Objective-C/impl.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ @implementation ObjCClass {
88
int private_ivar;
99
}
1010

11+
@synthesize number = private_ivar;
12+
1113
- (instancetype)init {
1214
self = [super init];
1315
if (self) {

0 commit comments

Comments
 (0)