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