xref: /llvm-project/bolt/test/X86/dwarf4-subprogram-single-gc-ranges.test (revision 11791ae7b0b05b8bd8d806331ff51da618912cf8)
1# REQUIRES: system-linux
2
3# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-subprogram-single-gc-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-dwarfdump --show-form --verbose --debug-info %t.bolt > %t1.txt
7# RUN: cat %t1.txt | FileCheck --check-prefix=POSTCHECK %s
8
9## This test checks BOLT correctly handles DW_TAG_subprogram with Ranges with single entry, when function was GCed.
10
11# POSTCHECK: DW_TAG_subprogram
12# POSTCHECK-NEXT: DW_AT_frame_base
13# POSTCHECK-NEXT: DW_AT_linkage_name
14# POSTCHECK-SAME: _Z7doStuffi
15# POSTCHECK-NEXT: DW_AT_name
16# POSTCHECK-NEXT: DW_AT_decl_file
17# POSTCHECK-NEXT: DW_AT_decl_line
18# POSTCHECK-NEXT: DW_AT_type
19# POSTCHECK-NEXT: DW_AT_external
20# POSTCHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
21# POSTCHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000001)
22