1 RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-objc.x86_64.o | FileCheck %s
2 RUN: not llvm-dwarfdump -error-display=details -verify %p/Inputs/dwarfdump-objc.x86_64.o | FileCheck %s --check-prefix=VERIFY
4 Gather some DIE indexes to verify the accelerator table contents.
5 CHECK: .debug_info contents
6 CHECK: [[TESTINTERFACE:0x[0-9a-f]*]]:{{.*}}DW_TAG_structure_type
8 CHECK: DW_AT_name{{.*}}"TestInterface"
9 CHECK: [[READONLY:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
11 CHECK: DW_AT_name{{.*}}"-[TestInterface ReadOnly]"
12 CHECK: [[ASSIGN:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
14 CHECK: DW_AT_name{{.*}}"-[TestInterface Assign]"
15 CHECK: [[SETASSIGN:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
17 CHECK: DW_AT_name{{.*}}"-[TestInterface setAssign:]"
20 Check that the section header is printed correclty.
21 CHECK: .apple_names contents:
22 CHECK: Magic: 0x48415348
24 CHECK: Hash function: 0x0
25 CHECK: Bucket count: 21
26 CHECK: Hashes count: 42
27 CHECK: HeaderData length: 12
28 CHECK: DIE offset base: 0
29 CHECK: Number of atoms: 1
32 CHECK-NEXT: Type: DW_ATOM_die_offset
33 CHECK-NEXT: Form: DW_FORM_data4
35 Check that the accelerators point to the right DIEs.
36 CHECK: String:{{.*}}"-[TestInterface ReadOnly]"
38 CHECK: Atom[0]: [[READONLY]]
40 Check that empty buckets are handled correctly.
45 Check that the accelerators point to the right DIEs.
46 CHECK: String:{{.*}}"-[TestInterface Assign]"
48 CHECK: Atom[0]: [[ASSIGN]]
49 CHECK: String:{{.*}}"-[TestInterface setAssign:]"
51 CHECK: Atom[0]: [[SETASSIGN]]
53 Check that types are referenced correctly.
54 CHECK: .apple_types contents:
55 CHECK: String:{{.*}}"TestInterface"
57 CHECK: Atom[0]: [[TESTINTERFACE]]
59 Check that an empty accelerator section is handled correctly.
60 CHECK: .apple_namespaces contents:
63 Check ObjC specific accelerators.
64 CHECK: .apple_objc contents:
65 CHECK: String{{.*}}"TestInterface"
67 CHECK: Atom[0]: [[READONLY]]
68 CHECK: Atom[0]: [[ASSIGN]]
69 CHECK: Atom[0]: [[SETASSIGN]]
71 Verify the debug info in the apple_names accelerator table.
72 VERIFY: Verifying .apple_names...
73 VERIFY-NEXT: Verifying .apple_types...
74 VERIFY-NEXT: Verifying .apple_namespaces...
75 VERIFY-NEXT: error: Section too small: cannot read buckets and hashes.
76 VERIFY-NEXT: Verifying .apple_objc...
77 VERIFY-NEXT: Errors detected.