llvm/llvm/test/tools/llvm-dwarfutil/ELF/X86/accelerator-dwarf5.test

## This test checks that .debug_names accelerator table
## is generated if --build-accelerator=DWARF option is
## specified and source file has DWARFv5 debug info.

# RUN: llvm-dwarfutil --no-garbage-collection --build-accelerator=DWARF %p/Inputs/dwarf5.out %t1
# RUN: llvm-dwarfdump --verify %t1 | FileCheck %s --check-prefix=VERIFY
# RUN: llvm-dwarfdump -a %t1 | FileCheck %s

# RUN: llvm-dwarfutil --garbage-collection --build-accelerator=DWARF %p/Inputs/dwarf5.out %t1
# RUN: llvm-dwarfdump --verify %t1 | FileCheck %s --check-prefix=VERIFY
# RUN: llvm-dwarfdump -a %t1 | FileCheck %s
#
# RUN: llvm-dwarfutil --linker parallel --no-garbage-collection \
# RUN:   --build-accelerator=DWARF %p/Inputs/dwarf5.out %t1
# RUN: llvm-dwarfdump --verify %t1 | FileCheck %s --check-prefix=VERIFY
# RUN: llvm-dwarfdump -a %t1 | FileCheck %s

# RUN: llvm-dwarfutil --linker parallel --garbage-collection \
# RUN:   --build-accelerator=DWARF %p/Inputs/dwarf5.out %t1
# RUN: llvm-dwarfdump --verify %t1 | FileCheck %s --check-prefix=VERIFY
# RUN: llvm-dwarfdump -a %t1 | FileCheck %s

# VERIFY: No errors

# CHECK: .debug_names contents:
# CHECK:  Compilation Unit offsets [
# CHECK:    CU[0]: 0x00000000
# CHECK:  ]
# CHECK: Abbreviations
# CHECK: String: {{.*}} "_Z3foov"
# CHECK: Tag: DW_TAG_subprogram
# CHECK: String: {{.*}} "int"
# CHECK: Tag: DW_TAG_base_type
# CHECK: String: {{.*}} "foo"
# CHECK: Tag: DW_TAG_subprogram
# CHECK: String: {{.*}} "A"
# CHECK: Tag: DW_TAG_structure_type
# CHECK: String: {{.*}} "main"
# CHECK: Tag: DW_TAG_subprogram
# CHECK: String: {{.*}} "char"
# CHECK: Tag: DW_TAG_base_type