diff options
| author | Frederic Riss <friss@apple.com> | 2014-10-10 15:51:10 +0000 |
|---|---|---|
| committer | Frederic Riss <friss@apple.com> | 2014-10-10 15:51:10 +0000 |
| commit | b3c9912a4524db75721b6e164bdfc472d2784752 (patch) | |
| tree | 24dcaf4aea32a01ebfae823a80502379800c3d82 /llvm/test | |
| parent | d4de180e19548b0de60126c8f63353aeeed5325a (diff) | |
| download | bcm5719-llvm-b3c9912a4524db75721b6e164bdfc472d2784752.tar.gz bcm5719-llvm-b3c9912a4524db75721b6e164bdfc472d2784752.zip | |
[dwarfdump] Prettyprint DW_AT_APPLE_property_attribute bitfield values.
This change depends on the ApplePropertyString helper that I sent spearately.
Not sure how you want this tested: as a tool test by adding a binary to dump, or as an llvm test starting from an IR file?
Reviewers: dblaikie, samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5689
llvm-svn: 219507
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/DebugInfo/Inputs/dwarfdump-objc.m | 16 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/Inputs/dwarfdump-objc.x86_64.o | bin | 0 -> 11512 bytes | |||
| -rw-r--r-- | llvm/test/DebugInfo/dwarfdump-objc.test | 40 |
3 files changed, 56 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-objc.m b/llvm/test/DebugInfo/Inputs/dwarfdump-objc.m new file mode 100644 index 00000000000..54fbee2ac39 --- /dev/null +++ b/llvm/test/DebugInfo/Inputs/dwarfdump-objc.m @@ -0,0 +1,16 @@ +// Compile with clang -g dwarfdump-objc.m -c -Wno-objc-root-class + +@interface NSObject {} @end + + +@interface TestInterface +@property (readonly) int ReadOnly; +@property (assign) int Assign; +@property (readwrite) int ReadWrite; +@property (retain) NSObject *Retain; +@property (copy) NSObject *Copy; +@property (nonatomic) int NonAtomic; +@end + +@implementation TestInterface +@end diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-objc.x86_64.o b/llvm/test/DebugInfo/Inputs/dwarfdump-objc.x86_64.o Binary files differnew file mode 100644 index 00000000000..6b55d38ce91 --- /dev/null +++ b/llvm/test/DebugInfo/Inputs/dwarfdump-objc.x86_64.o diff --git a/llvm/test/DebugInfo/dwarfdump-objc.test b/llvm/test/DebugInfo/dwarfdump-objc.test new file mode 100644 index 00000000000..6890c3a0471 --- /dev/null +++ b/llvm/test/DebugInfo/dwarfdump-objc.test @@ -0,0 +1,40 @@ +RUN: llvm-dwarfdump %p/Inputs/dwarfdump-objc.x86_64.o | FileCheck %s + +CHECK: .debug_info contents: + +CHECK: DW_TAG_APPLE_property +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_name {{.*}} "ReadOnly" +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_attribute {{.*}} (0x01 (DW_APPLE_PROPERTY_readonly)) + +CHECK: DW_TAG_APPLE_property +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_name {{.*}} "Assign" +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_attribute {{.*}} (0x0c (DW_APPLE_PROPERTY_assign, DW_APPLE_PROPERTY_readwrite)) + +CHECK: DW_TAG_APPLE_property +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_name {{.*}} "ReadWrite" +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_attribute {{.*}} (0x0c (DW_APPLE_PROPERTY_assign, DW_APPLE_PROPERTY_readwrite)) + +CHECK: DW_TAG_APPLE_property +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_name {{.*}} "Retain" +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_attribute {{.*}} (0x18 (DW_APPLE_PROPERTY_readwrite, DW_APPLE_PROPERTY_retain)) + +CHECK: DW_TAG_APPLE_property +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_name {{.*}} "Copy" +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_attribute {{.*}} (0x28 (DW_APPLE_PROPERTY_readwrite, DW_APPLE_PROPERTY_copy)) + +CHECK: DW_TAG_APPLE_property +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_name {{.*}} "NonAtomic" +CHECK-NOT: TAG +CHECK: DW_AT_APPLE_property_attribute {{.*}} (0x4c (DW_APPLE_PROPERTY_assign, DW_APPLE_PROPERTY_readwrite, DW_APPLE_PROPERTY_nonatomic)) + |

