1 # REQUIRES: system-linux
5 ; RUN: llvm-mc --split-dwarf-file=main.dwo --triple=x86_64-unknown-linux-gnu \
6 ; RUN: --filetype=obj %p/Inputs/dwarf5-df-cu-function-gc-main.s -o=main.o
7 ; RUN: llvm-mc --split-dwarf-file=helper.dwo --triple=x86_64-unknown-linux-gnu \
8 ; RUN: --filetype=obj %p/Inputs/dwarf5-df-cu-function-gc-helper.s -o=helper.o
9 ; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split -Wl,--entry=main -Wl,--gc-sections main.o helper.o -o main.exe
10 ; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
11 ; RUN: llvm-dwarfdump --debug-addr main.exe.bolt > addr.txt
12 ; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt >> addr.txt
13 ; RUN: cat addr.txt | FileCheck -check-prefix=BOLT %s
15 ; Tests we generate range when linker GCs only function used in CU
18 ; BOLT-NEXT: 0x[[#%.16x,ADDR:]]
20 ; BOLT-NEXT: 0x[[#%.16x,ADDR1:]]
22 ; BOLT: DW_TAG_skeleton_unit
23 ; BOLT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x00000010
24 ; BOLT-NEXT: [0x[[#ADDR]], 0x[[#ADDR + 0xf]]))
25 ; BOLT: DW_TAG_skeleton_unit
26 ; BOLT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x00000024
27 ; BOLT-NEXT: [0x[[#ADDR1]], 0x[[#ADDR1]]))