2 ## Test that the address range contributed by an ICF folded function is identical
3 ## to that of the folded-in function. Not considering ICF may lead to an address
4 ## range whose low address equals the start address of the output section.
6 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
7 # RUN: ld.lld --gdb-index --icf=all -Ttext=0x1000 %t.o -o %t
8 # RUN: llvm-dwarfdump --gdb-index %t | FileCheck %s
10 # CHECK: Address area offset = 0x38, has 2 entries:
11 # CHECK-NEXT: Low/High address = [0x1001, 0x1002) (Size: 0x1), CU id = 0
12 # CHECK-NEXT: Low/High address = [0x1001, 0x1002) (Size: 0x1), CU id = 1
27 .section .debug_abbrev,"",@progbits
28 .byte 1 # Abbreviation Code
29 .byte 65 # DW_TAG_type_unit
30 .byte 0 # DW_CHILDREN_no
34 .byte 2 # Abbreviation Code
35 .byte 17 # DW_TAG_compile_unit
36 .byte 0 # DW_CHILDREN_no
37 .byte 17 # DW_AT_low_pc
38 .byte 1 # DW_FORM_addr
39 .byte 18 # DW_AT_high_pc
40 .byte 6 # DW_FORM_data4
46 .section .debug_info,"",@progbits
48 .long .Lcu_end0-.Lcu_begin0-4 # Length of Unit
49 .short 5 # DWARF version number
50 .byte 1 # DWARF Unit Type
51 .byte 8 # Address Size
52 .long .debug_abbrev # Offset Into Abbrev. Section
53 .byte 2 # Abbrev [2] DW_TAG_compile_unit
54 .quad .Lfunc_begin0 # DW_AT_low_pc
55 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
59 .long .Lcu_end1-.Lcu_begin1-4 # Length of Unit
60 .short 5 # DWARF version number
61 .byte 1 # DWARF Unit Type
62 .byte 8 # Address Size
63 .long .debug_abbrev # Offset Into Abbrev. Section
64 .byte 2 # Abbrev [2] DW_TAG_compile_unit
65 .quad .Lfunc_begin1 # DW_AT_low_pc
66 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc