1; RUN: rm -rf %t 2; RUN: mkdir %t 3; RUN: cd %t 4; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-input-lowpc-ranges-main.s \ 5; RUN: -split-dwarf-file=main.dwo -o main.o 6; RUN: %clang %cflags -gdwarf-4 -gsplit-dwarf=split main.o -o main.exe 7; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections 8; RUN: llvm-dwarfdump --show-form --verbose --debug-rnglists main.exe.bolt &> %t/foo.txt 9; RUN: llvm-dwarfdump --show-form --verbose --debug-addr main.exe.bolt >> %t/foo.txt 10; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt >> %t/foo.txt 11; RUN: cat %t/foo.txt | FileCheck -check-prefix=BOLT %s 12; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo.dwo &> %t/mainddwodwo.txt 13; RUN: cat %t/mainddwodwo.txt | FileCheck -check-prefix=BOLT-DWO-MAIN %s 14 15;; Tests that BOLT correctly handles Skeleton CU which has DW_AT_low_pc/DW_AT_ranges as input. 16 17; BOLT: Addrs: [ 18; BOLT-NEXT: 0x[[#%.16x,ADDR1:]] 19; BOLT-NEXT: 0x[[#%.16x,ADDR2:]] 20; BOLT-NEXT: 0x[[#%.16x,ADDR3:]] 21; BOLT-NEXT: 0x[[#%.16x,ADDR4:]] 22; BOLT-NEXT: 0x[[#%.16x,ADDR5:]] 23 24 25; BOLT: DW_TAG_skeleton_unit 26; BOLT: DW_AT_dwo_name [DW_FORM_strx1] (indexed (00000001) string = "main.dwo.dwo") 27; BOLT-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) 28; BOLT-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x00000010 29; BOLT-NEXT: [0x[[#ADDR1]], 0x[[#ADDR1 + 0x16]]) 30; BOLT-NEXT: [0x[[#ADDR1 + 0x16]], 0x[[#ADDR1 + 0x24]]) 31; BOLT-NEXT: [0x[[#ADDR1 + 0x24]], 0x[[#ADDR1 + 0x29]]) 32; BOLT-NEXT: [0x[[#ADDR1 + 0x30]], 0x[[#ADDR1 + 0x46]]) 33; BOLT-NEXT: [0x[[#ADDR1 + 0x50]], 0x[[#ADDR1 + 0x77]]) 34; BOLT-NEXT: [0x[[#ADDR1 + 0x77]], 0x[[#ADDR1 + 0x85]]) 35; BOLT-NEXT: [0x[[#ADDR1 + 0x85]], 0x[[#ADDR1 + 0x9f]]) 36; BOLT-NEXT: DW_AT_addr_base [DW_FORM_sec_offset] (0x00000008) 37; BOLT-NEXT: DW_AT_rnglists_base [DW_FORM_sec_offset] (0x0000000c) 38 39; BOLT-DWO-MAIN: DW_TAG_subprogram 40; BOLT-DWO-MAIN-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x00000014 41; BOLT-DWO-MAIN-NEXT: [0x0000000000000000, 0x0000000000000016) 42; BOLT-DWO-MAIN-NEXT: [0x0000000000000016, 0x0000000000000024) 43; BOLT-DWO-MAIN-NEXT: [0x0000000000000024, 0x0000000000000029)) 44; BOLT-DWO-MAIN: DW_TAG_subprogram 45; BOLT-DWO-MAIN: DW_TAG_subprogram 46; BOLT-DWO-MAIN: DW_TAG_subprogram 47; BOLT-DWO-MAIN: DW_TAG_subprogram 48; BOLT-DWO-MAIN-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x1) rangelist = 0x00000020 49; BOLT-DWO-MAIN-NEXT: [0x0000000000000002, 0x0000000000000029) 50; BOLT-DWO-MAIN-NEXT: [0x0000000000000029, 0x0000000000000037) 51; BOLT-DWO-MAIN-NEXT: [0x0000000000000037, 0x0000000000000051)) 52