xref: /llvm-project/llvm/test/tools/llvm-dwarfutil/ELF/X86/accelerator-dwarf4.test (revision f1fdfe6888f93b9f6dfb4689e1f3206de584ff5b)
1## This test checks that .debug_names accelerator tables are
2## generated if --build-accelerator=DWARF option is specified
3## and source file has DWARFv4 debug info.
4
5# RUN: yaml2obj %p/Inputs/common.yaml -o %t.o
6
7# RUN: llvm-dwarfutil --no-garbage-collection --build-accelerator=DWARF %t.o %t1
8# RUN: llvm-dwarfdump --verify %t1 | FileCheck %s --check-prefix=VERIFY
9# RUN: llvm-dwarfdump -a %t1 | FileCheck %s
10
11# RUN: llvm-dwarfutil --garbage-collection --build-accelerator=DWARF %t.o %t1
12# RUN: llvm-dwarfdump --verify %t1 | FileCheck %s --check-prefix=VERIFY
13# RUN: llvm-dwarfdump -a %t1 | FileCheck %s
14#
15# RUN: llvm-dwarfutil --linker parallel --no-garbage-collection \
16# RUN:   --build-accelerator=DWARF %t.o %t1
17# RUN: llvm-dwarfdump --verify %t1 | FileCheck %s --check-prefix=VERIFY
18# RUN: llvm-dwarfdump -a %t1 | FileCheck %s
19
20# RUN: llvm-dwarfutil --linker parallel --garbage-collection \
21# RUN:   --build-accelerator=DWARF %t.o %t1
22# RUN: llvm-dwarfdump --verify %t1 | FileCheck %s --check-prefix=VERIFY
23# RUN: llvm-dwarfdump -a %t1 | FileCheck %s
24
25# VERIFY: No errors
26
27# CHECK: .debug_names contents:
28# CHECK:  Compilation Unit offsets [
29# CHECK:    CU[0]: 0x00000000
30# CHECK:  ]
31# CHECK: Abbreviations
32# CHECK: String: {{.*}} "foo1"
33# CHECK: Tag: DW_TAG_subprogram
34# CHECK: String: {{.*}} "class1"
35# CHECK: Tag: DW_TAG_class_type
36# CHECK: String: {{.*}} "float"
37# CHECK: Tag: DW_TAG_base_type
38# CHECK: String: {{.*}} "int"
39# CHECK: Tag: DW_TAG_base_type
40# CHECK: String: {{.*}} "var1"
41# CHECK: Tag: DW_TAG_variable
42# CHECK: String: {{.*}} "char"
43# CHECK: Tag: DW_TAG_base_type
44