xref: /llvm-project/bolt/test/X86/dwarf5-empty-arange.test (revision 6aad62cf5b7f91f4b02266cf72469e2c8e28dbef)
1# REQUIRES: system-linux
2
3# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-empty-arange-main.s   -o %tmain.o
4# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-empty-arange-helper.s -o %thelper.o
5# RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,--entry=main -Wl,-q -Wl,-gc-sections
6# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=4 --cu-processing-batch-size=4
7# RUN: llvm-dwarfdump --debug-aranges %t.bolt > %t.txt
8# RUN: llvm-dwarfdump --debug-info -r 0 %t.bolt >> %t.txt
9# RUN: cat %t.txt | FileCheck --check-prefix=POSTCHECK %s
10
11## This tests checks that BOLT handles correctly empty arange. Before we would output 0x0,0x0.
12## Which tools interpreted as an end to aragnes list.
13
14# POSTCHECK:      Address Range Header
15# POSTCHECK-NOT:  Address Range Header
16# POSTCHECK:      DW_TAG_compile_unit
17# POSTCHECK:      DW_TAG_compile_unit
18# POSTCHECK:      DW_AT_ranges
19# POSTCHECK-NEXT: [0x0000000000000000, 0x0000000000000000))
20