4 ;; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-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-ranges main.exe.bolt &> %t/foo.txt
9 ; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt >> %t/foo.txt
10 ; RUN: cat %t/foo.txt | FileCheck -check-prefix=BOLT %s
11 ; RUN: not llvm-dwarfdump --show-form --verbose --debug-info main.dwo.dwo &> %t/mainddwodwo.txt
12 ; RUN: cat %t/mainddwodwo.txt | FileCheck -check-prefix=BOLT-DWO-MAIN %s
14 ; Tests BOLT handles correctly Skeleton CU which has DW_AT_low_pc/DW_AT_ranges as input.
17 ; BOLT-NEXT: 00000000 <End of list>
21 ; BOLT-NEXT: 00000010 <End of list>
25 ; BOLT-NEXT: 00000050 <End of list>
26 ; BOLT-NEXT: 00000090 [[#%.16x,ADDR1:]] [[#%.16x,ADDRB1:]]
27 ; BOLT-NEXT: 00000090 [[#%.16x,ADDR2:]] [[#%.16x,ADDRB2:]]
28 ; BOLT-NEXT: 00000090 [[#%.16x,ADDR3:]] [[#%.16x,ADDRB3:]]
29 ; BOLT-NEXT: 00000090 [[#%.16x,ADDR4:]] [[#%.16x,ADDRB4:]]
30 ; BOLT-NEXT: 00000090 [[#%.16x,ADDR5:]] [[#%.16x,ADDRB5:]]
31 ; BOLT-NEXT: 00000090 [[#%.16x,ADDR6:]] [[#%.16x,ADDRB6:]]
32 ; BOLT-NEXT: 00000090 [[#%.16x,ADDR7:]] [[#%.16x,ADDRB7:]]
33 ; BOLT-NEXT: 00000090 <End of list>
35 ; BOLT: DW_TAG_compile_unit
36 ; BOLT: DW_AT_GNU_dwo_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-fA-F]+}}] = "main.dwo.dwo")
37 ; BOLT-NEXT: DW_AT_GNU_dwo_id
38 ; BOLT-NEXT: DW_AT_GNU_ranges_base [DW_FORM_sec_offset] (0x00000010)
39 ; BOLT-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
40 ; BOLT-NEXT: DW_AT_ranges [DW_FORM_sec_offset] (0x00000090
41 ; BOLT-NEXT: [0x[[#ADDR1]], 0x[[#ADDRB1]])
42 ; BOLT-NEXT: [0x[[#ADDR2]], 0x[[#ADDRB2]])
43 ; BOLT-NEXT: [0x[[#ADDR3]], 0x[[#ADDRB3]])
44 ; BOLT-NEXT: [0x[[#ADDR4]], 0x[[#ADDRB4]])
45 ; BOLT-NEXT: [0x[[#ADDR5]], 0x[[#ADDRB5]])
46 ; BOLT-NEXT: [0x[[#ADDR6]], 0x[[#ADDRB6]])
47 ; BOLT-NEXT: [0x[[#ADDR7]], 0x[[#ADDRB7]])
48 ; BOLT-NEXT: DW_AT_GNU_addr_base [DW_FORM_sec_offset] (0x00000000)
50 ; BOLT-DWO-MAIN: DW_TAG_subprogram
51 ; BOLT-DWO-MAIN-NEXT: DW_AT_ranges [DW_FORM_sec_offset] (0x00000000
52 ; BOLT-DWO-MAIN: DW_TAG_subprogram
53 ; BOLT-DWO-MAIN: DW_TAG_subprogram
54 ; BOLT-DWO-MAIN: DW_TAG_subprogram
55 ; BOLT-DWO-MAIN: DW_TAG_subprogram
56 ; BOLT-DWO-MAIN-NEXT: DW_AT_ranges [DW_FORM_sec_offset] (0x00000040