1 RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-objc.x86_64.o | FileCheck %s
2 RUN: not llvm-dwarfdump -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
23 CHECK: Version = 0x0001
24 CHECK: Hash function = 0x00000000
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
30 CHECK: Atom[0] Type: DW_ATOM_die_offset Form: DW_FORM_data4
32 Check that the accelerators point to the right DIEs.
33 CHECK: Name:{{.*}}"-[TestInterface ReadOnly]"
35 CHECK: {Atom[0]: [[READONLY]]}
37 Check that empty buckets are handled correctly.
42 Check that the accelerators point to the right DIEs.
43 CHECK: Name:{{.*}}"-[TestInterface Assign]"
45 CHECK: {Atom[0]: [[ASSIGN]]}
46 CHECK: Name:{{.*}}"-[TestInterface setAssign:]"
48 CHECK: {Atom[0]: [[SETASSIGN]]}
50 Check that types are referenced correctly.
51 CHECK: .apple_types contents:
52 CHECK: Name{{.*}}"TestInterface"
54 CHECK: {Atom[0]: [[TESTINTERFACE]]}
56 Check that an empty accelerator section is handled correctly.
57 CHECK: .apple_namespaces contents:
60 Check ObjC specific accelerators.
61 CHECK: .apple_objc contents:
62 CHECK: Name{{.*}}"TestInterface"
64 CHECK: {Atom[0]: [[READONLY]]}
65 CHECK: {Atom[0]: [[ASSIGN]]}
66 CHECK: {Atom[0]: [[SETASSIGN]]}
68 Verify the debug info in the apple_names accelerator table.
69 VERIFY: Verifying .apple_names...
70 VERIFY-NEXT: Verifying .apple_types...
71 VERIFY-NEXT: Verifying .apple_namespaces...
72 VERIFY-NEXT: error: Section is smaller than size described in section header.
73 VERIFY-NEXT: Verifying .apple_objc...
74 VERIFY-NEXT: Errors detected.