[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / tools / dsymutil / ARM / dwarf5-macho.test
blob6e4636486c3ccafac4d3dcf4a8f51459d92b878e
1 ; This test checks to that DWARF v5 debug info can be correctly linked
2 ; into a dSYM bundle by dsymutil, with the correct section names and DWARF v5
3 ; headers for the different sections.
5 ; 1.o was produced with the source file:
7 ; a.cpp
8 ; __attribute__((section("1,__text_foo"))) void foo() {}
10 ; int foo2(int a) {
11 ;     return a+5;
12 ; }
13 ; int main () {
14 ;     return 1;
15 ; }
17 ; clang -g -c -O1 a.cpp -Xclang -gdwarf-5 -o 1.o
20 RUN: rm -rf %t.dir && mkdir -p %t.dir
21 RUN: dsymutil -y %p/dummy-debug-map-amr64.map -oso-prepend-path=%p/../Inputs/DWARF5 -o %t.dir/dwarf5-macho.dSYM
22 RUN: llvm-dwarfdump %t.dir/dwarf5-macho.dSYM -a --verbose | FileCheck %s
24 CHECK:.debug_abbrev contents:
25 CHECK-NEXT: Abbrev table for offset: 0x00000000
27 CHECK: .debug_info contents:
28 CHECK-NEXT: Compile Unit: length = 0x0000004a, format = DWARF32, version = 0x0005, unit_type = DW_UT_compile, abbr_offset = 0x0000, addr_size = 0x08 
29 CHECK: DW_AT_ranges [DW_FORM_sec_offset] (0x[[RANGELIST_OFFSET:[0-9a-f]+]]
30 CHECK-NEXT:                  [0x[[RANGELIST_OFFSET_START:[0-9a-f]+]], 0x[[RANGELIST_OFFSET_END:[0-9a-f]+]]))
31 CHECK-NEXT: DW_AT_addr_base [DW_FORM_sec_offset]      (0x00000008)
32 CHECK: 0x0000002c:   DW_TAG_subprogram [2] * (0x0000000c)
33 CHECK-NEXT:  DW_AT_low_pc [DW_FORM_addrx]     (indexed (00000000) address = 0x[[#%.16x,LOCLIST_LOWPC:]])
34 CHECK: 0x0000003c:     DW_TAG_formal_parameter [3]   (0x0000002c)
35 CHECK-NEXT:                   DW_AT_location [DW_FORM_sec_offset]   (0x[[LOC_OFFSET:[0-9a-f]+]]: 
36 CHECK-NEXT:                      [0x[[#%.16x,LOCLIST_PAIR_START:]], 0x[[#%.16x,LOCLIST_PAIR_END:]]): [[LOCLIST_EXPR:.*]]
37 CHECK-NEXT:                      [0x[[#%.16x,LOCLIST_PAIR_START2:]], 0x[[#%.16x,LOCLIST_PAIR_END2:]]): [[LOCLIST_EXPR2:.*]])
39 CHECK: .debug_loclists contents:
40 CHECK-NEXT: 0x00000000: locations list header: length = 0x00000018, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
41 CHECK-NEXT: 0x[[LOC_OFFSET]]: 
42 CHECK-NEXT:            DW_LLE_base_addressx   (0x0000000000000000)
43 CHECK-NEXT:            DW_LLE_offset_pair     (0x[[#sub(LOCLIST_PAIR_START,LOCLIST_LOWPC)]], 0x[[#sub(LOCLIST_PAIR_END,LOCLIST_LOWPC)]])
44 CHECK-NEXT:            DW_LLE_offset_pair     (0x[[#sub(LOCLIST_PAIR_START2,LOCLIST_LOWPC)]], 0x[[#sub(LOCLIST_PAIR_END2,LOCLIST_LOWPC)]])
45 CHECK-NEXT:            DW_LLE_end_of_list     ()
47 CHECK: .debug_line contents:
48 CHECK-NEXT: debug_line[0x00000000]
49 CHECK-NEXT: Line table prologue:
50 CHECK-NEXT:     total_length: 0x00000048
51 CHECK-NEXT:           format: DWARF32
52 CHECK-NEXT:          version: 5
53 CHECK-NEXT:     address_size: 8
54 CHECK-NEXT:  seg_select_size: 0
55 CHECK-NEXT:  prologue_length: 0x00000025
56 CHECK-NEXT:  min_inst_length: 1
57 CHECK-NEXT: max_ops_per_inst: 1
58 CHECK-NEXT:  default_is_stmt: 1
59 CHECK-NEXT:        line_base: -5
60 CHECK-NEXT:       line_range: 14
61 CHECK-NEXT:      opcode_base: 13
62 CHECK-NEXT: standard_opcode_lengths[DW_LNS_copy] = 0
63 CHECK-NEXT: standard_opcode_lengths[DW_LNS_advance_pc] = 1
64 CHECK-NEXT: standard_opcode_lengths[DW_LNS_advance_line] = 1
65 CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_file] = 1
66 CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_column] = 1
67 CHECK-NEXT: standard_opcode_lengths[DW_LNS_negate_stmt] = 0
68 CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_basic_block] = 0
69 CHECK-NEXT: standard_opcode_lengths[DW_LNS_const_add_pc] = 0
70 CHECK-NEXT: standard_opcode_lengths[DW_LNS_fixed_advance_pc] = 1
71 CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_prologue_end] = 0
72 CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_epilogue_begin] = 0
73 CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_isa] = 1
74 CHECK-NEXT: include_directories[  0] =  .debug_line_str[0x00000000] = "/Users/shubham/Development/test109275485"
75 CHECK-NEXT: file_names[  0]:
76 CHECK-NEXT:            name:  .debug_line_str[0x00000029] = "a.cpp"
77 CHECK-NEXT:       dir_index: 0
80 CHECK: .debug_str contents:
82 CHECK: .debug_line_str contents:
83 CHECK-NEXT: 0x00000000: "/Users/shubham/Development/test109275485"
84 CHECK-NEXT: 0x00000029: "a.cpp"
86 CHECK: .debug_rnglists contents:
87 CHECK-NEXT: 0x00000000: range list header: length = 0x0000000e, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
88 CHECK-NEXT: ranges:
89 CHECK-NEXT: [[RANGELIST_OFFSET]]: [DW_RLE_base_addressx]:  0x0000000000000000
90 CHECK-NEXT: 0x0000000e: [DW_RLE_offset_pair  ]: {{.*}}[0x[[RANGELIST_OFFSET_START]], 0x[[RANGELIST_OFFSET_END]])
91 CHECK-NEXT: 0x00000011: [DW_RLE_end_of_list  ]
93 CHECK: .debug_names contents:
94 CHECK-NEX:T Name Index @ 0x0 {
95 CHECK-NEX:T   Header {
96 CHECK-NEX:T     Length: 0x7C
97 CHECK-NEX:T     Format: DWARF32
98 CHECK-NEX:T     Version: 5
99 CHECK-NEX:T     CU count: 1
100 CHECK-NEX:T     Local TU count: 0
101 CHECK-NEX:T     Foreign TU count: 0
102 CHECK-NEX:T     Bucket count: 3
103 CHECK-NEX:T     Name count: 3
104 CHECK-NEX:T     Abbreviations table size: 0xD
105 CHECK-NEX:T     Augmentation: 'LLVM0700'
106 CHECK-NEX:T   }