diff options
| author | Adrian Prantl <aprantl@apple.com> | 2019-11-21 17:21:49 -0800 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2019-11-22 09:55:25 -0800 |
| commit | c0eeea5d74d979139378660513712e8f33278285 (patch) | |
| tree | 42d71b7a6bd61f7d2b6a8880c8d4aa20058c6072 /lldb/test/Shell/SymbolFile | |
| parent | 01e8dd2e7a852794a60e50f356f171f893503598 (diff) | |
| download | bcm5719-llvm-c0eeea5d74d979139378660513712e8f33278285.tar.gz bcm5719-llvm-c0eeea5d74d979139378660513712e8f33278285.zip | |
Register Objective-C property accessors with their property decls.
This is a correctness fix for the Clang DWARF parser that primarily
matters for swift-lldb's ability to import Clang types that were
reconstructed from DWARF into Swift.
rdar://problem/55025799
Differential Revision: https://reviews.llvm.org/D70580
Diffstat (limited to 'lldb/test/Shell/SymbolFile')
3 files changed, 31 insertions, 2 deletions
diff --git a/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-objc-property.m b/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-objc-property.m new file mode 100644 index 00000000000..88d8406eecd --- /dev/null +++ b/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-objc-property.m @@ -0,0 +1,29 @@ +// REQUIRES: system-darwin +// +// RUN: %clang_host -g -c -o %t.o %s +// RUN: lldb-test symbols -dump-clang-ast %t.o | FileCheck %s + +__attribute__((objc_root_class)) +@interface Root +@property (readonly) int ro_number; +@property int rw_number; +@property (readonly, getter=custom_getter) int manual; +- (int)custom_getter; +@property (class, readonly) int class_property; +@end + +Root *obj; + +// CHECK: |-ObjCPropertyDecl {{.*}} ro_number 'int' readonly +// CHECK: | `-getter ObjCMethod [[READONLY:0x[0-9a-f]+]] 'ro_number' +// CHECK: |-ObjCMethodDecl [[READONLY]] {{.*}} implicit - ro_number 'int' +// CHECK: |-ObjCPropertyDecl {{.*}} rw_number 'int' assign readwrite +// CHECK: | |-getter ObjCMethod {{.*}} 'rw_number' +// CHECK: | `-setter ObjCMethod {{.*}} 'setRw_number:' +// CHECK: |-ObjCPropertyDecl {{.*}} manual 'int' readonly +// CHECK: | `-getter ObjCMethod [[CUSTOM:0x[0-9a-f]+]] 'custom_getter' +// CHECK: |-ObjCMethodDecl [[CUSTOM]] {{.*}} - custom_getter 'int' +// CHECK: |-ObjCPropertyDecl {{.*}} class_property 'int' readonly class +// CHECK: | `-getter ObjCMethod [[CLASS:0x[0-9a-f]+]] 'class_property' +// CHECK: `-ObjCMethodDecl [[CLASS]] {{.*}} + class_property 'int' + diff --git a/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp b/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp index 575ae4fdc9f..4d267f07745 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp +++ b/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp @@ -1,6 +1,6 @@ // UNSUPPORTED: system-windows // -// Test to verify we are corectly generating anonymous flags when parsing +// Test to verify we are correctly generating anonymous flags when parsing // anonymous class and unnamed structs from DWARF to the a clang AST node. // RUN: %clangxx_host -g -c -o %t.o %s diff --git a/lldb/test/Shell/SymbolFile/DWARF/lit.local.cfg b/lldb/test/Shell/SymbolFile/DWARF/lit.local.cfg index d7ddcbf641c..8c4600c6922 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/lit.local.cfg +++ b/lldb/test/Shell/SymbolFile/DWARF/lit.local.cfg @@ -1 +1 @@ -config.suffixes = ['.cpp', '.s', '.test', '.ll'] +config.suffixes = ['.cpp', '.m', '.s', '.test', '.ll'] |

