1 # REQUIRES: system-linux
3 # RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-subprogram-single-ranges-main.s -o %t1.o
4 # RUN: %clang %cflags %t1.o -o %t.exe -Wl,-q
5 # RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6 # RUN: llvm-objdump %t.bolt --disassemble > %t1.txt
7 # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t1.txt
8 # RUN: cat %t1.txt | FileCheck --check-prefix=POSTCHECK %s
10 # This test checks BOLT correctly handles DW_TAG_subprogram with Ranges with single entry.
12 # POSTCHECK: _Z7doStuffi>:
13 # POSTCHECK: [[#%.6x,ADDR:]]
15 # POSTCHECK: DW_TAG_subprogram
16 # POSTCHECK-NEXT: DW_AT_frame_base
17 # POSTCHECK-NEXT: DW_AT_linkage_name
18 # POSTCHECK-SAME: _Z7doStuffi
19 # POSTCHECK-NEXT: DW_AT_name
20 # POSTCHECK-NEXT: DW_AT_decl_file
21 # POSTCHECK-NEXT: DW_AT_decl_line
22 # POSTCHECK-NEXT: DW_AT_type
23 # POSTCHECK-NEXT: DW_AT_external
24 # POSTCHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000[[#ADDR]])
25 # POSTCHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x0000001b)