xref: /llvm-project/bolt/test/X86/dwarf5-subprogram-single-gc-ranges.test (revision 11791ae7b0b05b8bd8d806331ff51da618912cf8)
175f770a6SAlexander Yermolovich# REQUIRES: system-linux
275f770a6SAlexander Yermolovich
375f770a6SAlexander Yermolovich# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-subprogram-single-gc-ranges-main.s -o %t1.o
475f770a6SAlexander Yermolovich# RUN: %clang %cflags %t1.o -o %t.exe -Wl,-q
582ca7523SAlexander Yermolovich# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
682ca7523SAlexander Yermolovich# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt > %t1.txt
775f770a6SAlexander Yermolovich# RUN: cat %t1.txt | FileCheck --check-prefix=POSTCHECK %s
875f770a6SAlexander Yermolovich
9*11791ae7SSayhaan Siddiqui## This test checks BOLT correctly handles DW_TAG_subprogram with Ranges with single entry, when function was GCed.
1075f770a6SAlexander Yermolovich
1175f770a6SAlexander Yermolovich# POSTCHECK: DW_TAG_subprogram
1275f770a6SAlexander Yermolovich# POSTCHECK-NEXT: DW_AT_frame_base
1375f770a6SAlexander Yermolovich# POSTCHECK-NEXT: DW_AT_linkage_name
1475f770a6SAlexander Yermolovich# POSTCHECK-SAME: _Z7doStuffi
1575f770a6SAlexander Yermolovich# POSTCHECK-NEXT: DW_AT_name
1675f770a6SAlexander Yermolovich# POSTCHECK-NEXT: DW_AT_decl_file
1775f770a6SAlexander Yermolovich# POSTCHECK-NEXT: DW_AT_decl_line
1875f770a6SAlexander Yermolovich# POSTCHECK-NEXT: DW_AT_type
1975f770a6SAlexander Yermolovich# POSTCHECK-NEXT: DW_AT_external
2075f770a6SAlexander Yermolovich# POSTCHECK-NEXT: DW_AT_low_pc [DW_FORM_addrx]  (indexed (00000001) address = 0x0000000000000000)
2175f770a6SAlexander Yermolovich# POSTCHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000001)
22