1RUN: llvm-dwarfdump %p/Inputs/dwarfdump-type-units.elf-x86-64 > %t
2RUN: cat %t | FileCheck -check-prefix=FOO %s
3RUN: cat %t | FileCheck -check-prefix=BAR %s
4RUN: llvm-dwarfdump -debug-dump=types %p/Inputs/dwarfdump-type-units.elf-x86-64 | FileCheck -check-prefix=TYPES %s
5
6FOO: debug_info contents:
7FOO: DW_TAG_variable
8FOO-NEXT: DW_AT_name {{.*}}"f"
9FOO: DW_AT_type [DW_FORM_ref_sig8] ([[FOO_SIG:0x[0-9a-f]*]])
10
11FOO: debug_types contents:
12FOO: 0x00000000: Type Unit: {{.*}} type_signature = [[FOO_SIG]] type_offset = 0x[[FOO_OFF:[0-9a-f]*]] (next unit at
13FOO: DW_TAG_type_unit
14FOO-NOT: NULL
15FOO: 0x0000[[FOO_OFF]]: DW_TAG_structure_type
16FOO-NEXT: DW_AT_name {{.*}}"foo"
17
18BAR: debug_info contents:
19BAR: DW_TAG_variable
20BAR: DW_TAG_variable
21BAR-NEXT: DW_AT_name {{.*}}"b"
22BAR: DW_AT_type [DW_FORM_ref_sig8] ([[BAR_SIG:0x[0-9a-f]*]])
23
24BAR: debug_types contents:
25BAR: 0x00000000: Type Unit: {{.*}} type_signature = [[BAR_SIG]] type_offset = 0x[[BAR_OFF:[0-9a-f]*]] (next unit at
26BAR: DW_TAG_type_unit
27BAR-NOT: NULL
28BAR: 0x0000[[BAR_OFF]]: DW_TAG_structure_type
29BAR-NEXT: DW_AT_name {{.*}}"bar"
30
31TYPES-NOT: debug_info contents:
32TYPES: debug_types contents:
33