[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / DebugInfo / XCOFF / explicit-section.ll
blob73a091b66f433cbc601b777f3fb4c1c3a3d7e21a
2 ; RUN: llc -debugger-tune=gdb -mtriple powerpc-ibm-aix-xcoff < %s | \
3 ; RUN:   FileCheck %s
5 source_filename = "2.c"
6 target datalayout = "E-m:a-p:32:32-i64:64-n32"
8 ; Function Attrs: noinline nounwind optnone
9 define i32 @bar() #0 !dbg !8 {
10 entry:
11   ret i32 1, !dbg !13
14 ; Function Attrs: noinline nounwind optnone
15 define i32 @main() #0 section "explicit_main_sec" !dbg !14 {
16 entry:
17   %retval = alloca i32, align 4
18   store i32 0, i32* %retval, align 4
19   %call = call i32 @bar(), !dbg !15
20   ret i32 %call, !dbg !16
23 !llvm.dbg.cu = !{!0}
24 !llvm.module.flags = !{!3, !4, !5, !6}
25 !llvm.ident = !{!7}
27 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 13.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
28 !1 = !DIFile(filename: "2.c", directory: "debug")
29 !2 = !{}
30 !3 = !{i32 7, !"Dwarf Version", i32 3}
31 !4 = !{i32 2, !"Debug Info Version", i32 3}
32 !5 = !{i32 1, !"wchar_size", i32 2}
33 !6 = !{i32 7, !"PIC Level", i32 2}
34 !7 = !{!"clang version 13.0.0"}
35 !8 = distinct !DISubprogram(name: "bar", scope: !9, file: !9, line: 1, type: !10, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
36 !9 = !DIFile(filename: "2.c", directory: "debug")
37 !10 = !DISubroutineType(types: !11)
38 !11 = !{!12}
39 !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
40 !13 = !DILocation(line: 1, column: 12, scope: !8)
41 !14 = distinct !DISubprogram(name: "main", scope: !9, file: !9, line: 2, type: !10, scopeLine: 2, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
42 !15 = !DILocation(line: 3, column: 10, scope: !14)
43 !16 = !DILocation(line: 3, column: 3, scope: !14)
45 ; CHECK:               .csect .text[PR],2
46 ; CHECK-NEXT:          .file   "2.c"
47 ; CHECK-NEXT:          .globl  bar[DS]                         # -- Begin function bar
48 ; CHECK-NEXT:          .globl  .bar
49 ; CHECK-NEXT:          .align  2
50 ; CHECK-NEXT:          .csect bar[DS],2
51 ; CHECK-NEXT:          .vbyte  4, .bar                         # @bar
52 ; CHECK-NEXT:          .vbyte  4, TOC[TC0]
53 ; CHECK-NEXT:          .vbyte  4, 0
54 ; CHECK-NEXT:          .csect .text[PR],2
55 ; CHECK-NEXT:  .bar:
56 ; CHECK-NEXT:  L..func_begin0:
57 ; CHECK-NEXT:  # %bb.0:                                # %entry
58 ; CHECK-NEXT:  L..tmp0:
59 ; CHECK-NEXT:  L..tmp1:
60 ; CHECK-NEXT:          li 3, 1
61 ; CHECK-NEXT:          blr
62 ; CHECK-NEXT:  L..tmp2:
63 ; CHECK-NEXT:  L..bar0:
64 ; CHECK-NEXT:          .vbyte  4, 0x00000000                   # Traceback table begin
65 ; CHECK-NEXT:          .byte   0x00                            # Version = 0
66 ; CHECK-NEXT:          .byte   0x09                            # Language = CPlusPlus
67 ; CHECK-NEXT:          .byte   0x20                            # -IsGlobaLinkage, -IsOutOfLineEpilogOrPrologue
68 ; CHECK-NEXT:                                          # +HasTraceBackTableOffset, -IsInternalProcedure
69 ; CHECK-NEXT:                                          # -HasControlledStorage, -IsTOCless
70 ; CHECK-NEXT:                                          # -IsFloatingPointPresent
71 ; CHECK-NEXT:                                          # -IsFloatingPointOperationLogOrAbortEnabled
72 ; CHECK-NEXT:          .byte   0x40                            # -IsInterruptHandler, +IsFunctionNamePresent, -IsAllocaUsed
73 ; CHECK-NEXT:                                          # OnConditionDirective = 0, -IsCRSaved, -IsLRSaved
74 ; CHECK-NEXT:          .byte   0x80                            # +IsBackChainStored, -IsFixup, NumOfFPRsSaved = 0
75 ; CHECK-NEXT:          .byte   0x00                            # -HasExtensionTable, -HasVectorInfo, NumOfGPRsSaved = 0
76 ; CHECK-NEXT:          .byte   0x00                            # NumberOfFixedParms = 0
77 ; CHECK-NEXT:          .byte   0x01                            # NumberOfFPParms = 0, +HasParmsOnStack
78 ; CHECK-NEXT:          .vbyte  4, L..bar0-.bar                 # Function size
79 ; CHECK-NEXT:          .vbyte  2, 0x0003                       # Function name len = 3
80 ; CHECK-NEXT:          .byte   "bar"                           # Function Name
81 ; CHECK-NEXT:  L..func_end0:
82 ; CHECK-NEXT:                                          # -- End function
83 ; CHECK-NEXT:          .csect explicit_main_sec[PR],2
84 ; CHECK-NEXT:          .globl  main[DS]                        # -- Begin function main
85 ; CHECK-NEXT:          .globl  .main
86 ; CHECK-NEXT:          .align  2
87 ; CHECK-NEXT:          .csect main[DS],2
88 ; CHECK-NEXT:          .vbyte  4, .main                        # @main
89 ; CHECK-NEXT:          .vbyte  4, TOC[TC0]
90 ; CHECK-NEXT:          .vbyte  4, 0
91 ; CHECK-NEXT:          .csect explicit_main_sec[PR],2
92 ; CHECK-NEXT:  .main:
93 ; CHECK-NEXT:  L..func_begin1:
94 ; CHECK-NEXT:  # %bb.0:                                # %entry
95 ; CHECK-NEXT:  L..tmp3:
96 ; CHECK-NEXT:          mflr 0
97 ; CHECK-NEXT:          stw 0, 8(1)
98 ; CHECK-NEXT:          stwu 1, -64(1)
99 ; CHECK-NEXT:          li 3, 0
100 ; CHECK-NEXT:          stw 3, 60(1)
101 ; CHECK-NEXT:  L..tmp4:
102 ; CHECK-NEXT:  L..tmp5:
103 ; CHECK-NEXT:          bl .bar
104 ; CHECK-NEXT:          nop
105 ; CHECK-NEXT:  L..tmp6:
106 ; CHECK-NEXT:          addi 1, 1, 64
107 ; CHECK-NEXT:          lwz 0, 8(1)
108 ; CHECK-NEXT:          mtlr 0
109 ; CHECK-NEXT:          blr
110 ; CHECK-NEXT:  L..tmp7:
111 ; CHECK-NEXT:  L..main0:
112 ; CHECK-NEXT:          .vbyte  4, 0x00000000                   # Traceback table begin
113 ; CHECK-NEXT:          .byte   0x00                            # Version = 0
114 ; CHECK-NEXT:          .byte   0x09                            # Language = CPlusPlus
115 ; CHECK-NEXT:          .byte   0x20                            # -IsGlobaLinkage, -IsOutOfLineEpilogOrPrologue
116 ; CHECK-NEXT:                                          # +HasTraceBackTableOffset, -IsInternalProcedure
117 ; CHECK-NEXT:                                          # -HasControlledStorage, -IsTOCless
118 ; CHECK-NEXT:                                          # -IsFloatingPointPresent
119 ; CHECK-NEXT:                                          # -IsFloatingPointOperationLogOrAbortEnabled
120 ; CHECK-NEXT:          .byte   0x41                            # -IsInterruptHandler, +IsFunctionNamePresent, -IsAllocaUsed
121 ; CHECK-NEXT:                                          # OnConditionDirective = 0, -IsCRSaved, +IsLRSaved
122 ; CHECK-NEXT:          .byte   0x80                            # +IsBackChainStored, -IsFixup, NumOfFPRsSaved = 0
123 ; CHECK-NEXT:          .byte   0x00                            # -HasExtensionTable, -HasVectorInfo, NumOfGPRsSaved = 0
124 ; CHECK-NEXT:          .byte   0x00                            # NumberOfFixedParms = 0
125 ; CHECK-NEXT:          .byte   0x01                            # NumberOfFPParms = 0, +HasParmsOnStack
126 ; CHECK-NEXT:          .vbyte  4, L..main0-.main               # Function size
127 ; CHECK-NEXT:          .vbyte  2, 0x0004                       # Function name len = 4
128 ; CHECK-NEXT:          .byte   "main"                          # Function Name
129 ; CHECK-NEXT:  L..func_end1:
130 ; CHECK-NEXT:                                          # -- End function
131 ; CHECK-NEXT:  L..sec_end0:
132 ; CHECK:               .dwsect 0x60000
133 ; CHECK-NEXT:  L...dwabrev:
134 ; CHECK-NEXT:          .byte   1                               # Abbreviation Code
135 ; CHECK-NEXT:          .byte   17                              # DW_TAG_compile_unit
136 ; CHECK-NEXT:          .byte   1                               # DW_CHILDREN_yes
137 ; CHECK-NEXT:          .byte   37                              # DW_AT_producer
138 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
139 ; CHECK-NEXT:          .byte   19                              # DW_AT_language
140 ; CHECK-NEXT:          .byte   5                               # DW_FORM_data2
141 ; CHECK-NEXT:          .byte   3                               # DW_AT_name
142 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
143 ; CHECK-NEXT:          .byte   16                              # DW_AT_stmt_list
144 ; CHECK-NEXT:          .byte   6                               # DW_FORM_data4
145 ; CHECK-NEXT:          .byte   27                              # DW_AT_comp_dir
146 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
147 ; CHECK-NEXT:          .byte   17                              # DW_AT_low_pc
148 ; CHECK-NEXT:          .byte   1                               # DW_FORM_addr
149 ; CHECK-NEXT:          .byte   85                              # DW_AT_ranges
150 ; CHECK-NEXT:          .byte   6                               # DW_FORM_data4
151 ; CHECK-NEXT:          .byte   0                               # EOM(1)
152 ; CHECK-NEXT:          .byte   0                               # EOM(2)
153 ; CHECK-NEXT:          .byte   2                               # Abbreviation Code
154 ; CHECK-NEXT:          .byte   46                              # DW_TAG_subprogram
155 ; CHECK-NEXT:          .byte   0                               # DW_CHILDREN_no
156 ; CHECK-NEXT:          .byte   17                              # DW_AT_low_pc
157 ; CHECK-NEXT:          .byte   1                               # DW_FORM_addr
158 ; CHECK-NEXT:          .byte   18                              # DW_AT_high_pc
159 ; CHECK-NEXT:          .byte   1                               # DW_FORM_addr
160 ; CHECK-NEXT:          .byte   64                              # DW_AT_frame_base
161 ; CHECK-NEXT:          .byte   10                              # DW_FORM_block1
162 ; CHECK-NEXT:          .byte   3                               # DW_AT_name
163 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
164 ; CHECK-NEXT:          .byte   58                              # DW_AT_decl_file
165 ; CHECK-NEXT:          .byte   11                              # DW_FORM_data1
166 ; CHECK-NEXT:          .byte   59                              # DW_AT_decl_line
167 ; CHECK-NEXT:          .byte   11                              # DW_FORM_data1
168 ; CHECK-NEXT:          .byte   73                              # DW_AT_type
169 ; CHECK-NEXT:          .byte   19                              # DW_FORM_ref4
170 ; CHECK-NEXT:          .byte   63                              # DW_AT_external
171 ; CHECK-NEXT:          .byte   12                              # DW_FORM_flag
172 ; CHECK-NEXT:          .byte   0                               # EOM(1)
173 ; CHECK-NEXT:          .byte   0                               # EOM(2)
174 ; CHECK-NEXT:          .byte   3                               # Abbreviation Code
175 ; CHECK-NEXT:          .byte   36                              # DW_TAG_base_type
176 ; CHECK-NEXT:          .byte   0                               # DW_CHILDREN_no
177 ; CHECK-NEXT:          .byte   3                               # DW_AT_name
178 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
179 ; CHECK-NEXT:          .byte   62                              # DW_AT_encoding
180 ; CHECK-NEXT:          .byte   11                              # DW_FORM_data1
181 ; CHECK-NEXT:          .byte   11                              # DW_AT_byte_size
182 ; CHECK-NEXT:          .byte   11                              # DW_FORM_data1
183 ; CHECK-NEXT:          .byte   0                               # EOM(1)
184 ; CHECK-NEXT:          .byte   0                               # EOM(2)
185 ; CHECK-NEXT:          .byte   0                               # EOM(3)
186 ; CHECK:               .dwsect 0x10000
187 ; CHECK-NEXT:  L...dwinfo:
188 ; CHECK-NEXT:  L..cu_begin0:
189 ; CHECK-NEXT:          .vbyte  2, 3                            # DWARF version number
190 ; CHECK-NEXT:          .vbyte  4, L...dwabrev                  # Offset Into Abbrev. Section
191 ; CHECK-NEXT:          .byte   4                               # Address Size (in bytes)
192 ; CHECK-NEXT:          .byte   1                               # Abbrev [1] 0xb:0x4f DW_TAG_compile_unit
193 ; CHECK-NEXT:          .vbyte  4, L..info_string0              # DW_AT_producer
194 ; CHECK-NEXT:          .vbyte  2, 12                           # DW_AT_language
195 ; CHECK-NEXT:          .vbyte  4, L..info_string1              # DW_AT_name
196 ; CHECK-NEXT:          .vbyte  4, L..line_table_start0         # DW_AT_stmt_list
197 ; CHECK-NEXT:          .vbyte  4, L..info_string2              # DW_AT_comp_dir
198 ; CHECK-NEXT:          .vbyte  4, 0                            # DW_AT_low_pc
199 ; CHECK-NEXT:          .vbyte  4, L..debug_ranges0             # DW_AT_ranges
200 ; CHECK-NEXT:          .byte   2                               # Abbrev [2] 0x26:0x16 DW_TAG_subprogram
201 ; CHECK-NEXT:          .vbyte  4, L..func_begin0               # DW_AT_low_pc
202 ; CHECK-NEXT:          .vbyte  4, L..func_end0                 # DW_AT_high_pc
203 ; CHECK-NEXT:          .byte   1                               # DW_AT_frame_base
204 ; CHECK-NEXT:          .byte   81
205 ; CHECK-NEXT:          .vbyte  4, L..info_string3              # DW_AT_name
206 ; CHECK-NEXT:          .byte   1                               # DW_AT_decl_file
207 ; CHECK-NEXT:          .byte   1                               # DW_AT_decl_line
208 ; CHECK-NEXT:          .vbyte  4, 82                           # DW_AT_type
209 ; CHECK-NEXT:          .byte   1                               # DW_AT_external
210 ; CHECK-NEXT:          .byte   2                               # Abbrev [2] 0x3c:0x16 DW_TAG_subprogram
211 ; CHECK-NEXT:          .vbyte  4, L..func_begin1               # DW_AT_low_pc
212 ; CHECK-NEXT:          .vbyte  4, L..func_end1                 # DW_AT_high_pc
213 ; CHECK-NEXT:          .byte   1                               # DW_AT_frame_base
214 ; CHECK-NEXT:          .byte   81
215 ; CHECK-NEXT:          .vbyte  4, L..info_string5              # DW_AT_name
216 ; CHECK-NEXT:          .byte   1                               # DW_AT_decl_file
217 ; CHECK-NEXT:          .byte   2                               # DW_AT_decl_line
218 ; CHECK-NEXT:          .vbyte  4, 82                           # DW_AT_type
219 ; CHECK-NEXT:          .byte   1                               # DW_AT_external
220 ; CHECK-NEXT:          .byte   3                               # Abbrev [3] 0x52:0x7 DW_TAG_base_type
221 ; CHECK-NEXT:          .vbyte  4, L..info_string4              # DW_AT_name
222 ; CHECK-NEXT:          .byte   5                               # DW_AT_encoding
223 ; CHECK-NEXT:          .byte   4                               # DW_AT_byte_size
224 ; CHECK-NEXT:          .byte   0                               # End Of Children Mark
225 ; CHECK-NEXT:  L..debug_info_end0:
226 ; CHECK:               .dwsect 0x80000
227 ; CHECK-NEXT:  L...dwrnges:
228 ; CHECK-NEXT:  L..debug_ranges0:
229 ; CHECK-NEXT:          .vbyte  4, L..func_begin0
230 ; CHECK-NEXT:          .vbyte  4, L..func_end0
231 ; CHECK-NEXT:          .vbyte  4, L..func_begin1
232 ; CHECK-NEXT:          .vbyte  4, L..func_end1
233 ; CHECK-NEXT:          .vbyte  4, 0
234 ; CHECK-NEXT:          .vbyte  4, 0
235 ; CHECK:               .dwsect 0x70000
236 ; CHECK-NEXT:  L...dwstr:
237 ; CHECK-NEXT:  L..info_string0:
238 ; CHECK-NEXT:   .string "clang version 13.0.0"          # string offset=0
239 ; CHECK-NEXT:  L..info_string1:
240 ; CHECK-NEXT:   .string "2.c"                           # string offset=21
241 ; CHECK-NEXT:  L..info_string2:
242 ; CHECK-NEXT:   .string "debug"                         # string offset=25
243 ; CHECK-NEXT:  L..info_string3:
244 ; CHECK-NEXT:   .string "bar"                           # string offset=31
245 ; CHECK-NEXT:  L..info_string4:
246 ; CHECK-NEXT:   .string "int"                           # string offset=35
247 ; CHECK-NEXT:  L..info_string5:
248 ; CHECK-NEXT:   .string "main"                          # string offset=39
249 ; CHECK-NEXT:          .toc
250 ; CHECK:               .dwsect 0x20000
251 ; CHECK-NEXT:  L...dwline:
252 ; CHECK-NEXT:  L..debug_line_0:
253 ; CHECK-NEXT:  .set L..line_table_start0, L..debug_line_0-4
254 ; CHECK-NEXT:          .vbyte  2, 3
255 ; CHECK-NEXT:          .vbyte  4, L..prologue_end0-L..prologue_start0
256 ; CHECK-NEXT:  L..prologue_start0:
257 ; CHECK-NEXT:          .byte   4
258 ; CHECK-NEXT:          .byte   1
259 ; CHECK-NEXT:          .byte   -5
260 ; CHECK-NEXT:          .byte   14
261 ; CHECK-NEXT:          .byte   13
262 ; CHECK-NEXT:          .byte   0
263 ; CHECK-NEXT:          .byte   1
264 ; CHECK-NEXT:          .byte   1
265 ; CHECK-NEXT:          .byte   1
266 ; CHECK-NEXT:          .byte   1
267 ; CHECK-NEXT:          .byte   0
268 ; CHECK-NEXT:          .byte   0
269 ; CHECK-NEXT:          .byte   0
270 ; CHECK-NEXT:          .byte   1
271 ; CHECK-NEXT:          .byte   0
272 ; CHECK-NEXT:          .byte   0
273 ; CHECK-NEXT:          .byte   1
274 ; CHECK-NEXT:          .byte   "debug"
275 ; CHECK-NEXT:          .byte   0
276 ; CHECK-NEXT:          .byte   0
277 ; CHECK-NEXT:          .byte   "2.c"
278 ; CHECK-NEXT:          .byte   0
279 ; CHECK-NEXT:          .byte   1
280 ; CHECK-NEXT:          .byte   0
281 ; CHECK-NEXT:          .byte   0
282 ; CHECK-NEXT:          .byte   0
283 ; CHECK-NEXT:  L..prologue_end0:
284 ; CHECK-NEXT:          .byte   0                               # Set address to L..tmp0
285 ; CHECK-NEXT:          .byte   5
286 ; CHECK-NEXT:          .byte   2
287 ; CHECK-NEXT:          .vbyte  4, L..tmp0
288 ; CHECK-NEXT:          .byte   1                               # Start sequence
289 ; CHECK-NEXT:          .byte   5
290 ; CHECK-NEXT:          .byte   12
291 ; CHECK-NEXT:          .byte   10
292 ; CHECK-NEXT:          .byte   0                               # Set address to L..tmp1
293 ; CHECK-NEXT:          .byte   5
294 ; CHECK-NEXT:          .byte   2
295 ; CHECK-NEXT:          .vbyte  4, L..tmp1
296 ; CHECK-NEXT:          .byte   3                               # Advance line 0
297 ; CHECK-NEXT:          .byte   0
298 ; CHECK-NEXT:          .byte   1
299 ; CHECK-NEXT:          .byte   0                               # Set address to L..sec_end0
300 ; CHECK-NEXT:          .byte   5
301 ; CHECK-NEXT:          .byte   2
302 ; CHECK-NEXT:          .vbyte  4, L..sec_end0
303 ; CHECK-NEXT:          .byte   0                               # End sequence
304 ; CHECK-NEXT:          .byte   1
305 ; CHECK-NEXT:          .byte   1
306 ; CHECK-NEXT:          .byte   0                               # Set address to L..tmp3
307 ; CHECK-NEXT:          .byte   5
308 ; CHECK-NEXT:          .byte   2
309 ; CHECK-NEXT:          .vbyte  4, L..tmp3
310 ; CHECK-NEXT:          .byte   19                              # Start sequence
311 ; CHECK-NEXT:          .byte   5
312 ; CHECK-NEXT:          .byte   10
313 ; CHECK-NEXT:          .byte   10
314 ; CHECK-NEXT:          .byte   0                               # Set address to L..tmp5
315 ; CHECK-NEXT:          .byte   5
316 ; CHECK-NEXT:          .byte   2
317 ; CHECK-NEXT:          .vbyte  4, L..tmp5
318 ; CHECK-NEXT:          .byte   3                               # Advance line 1
319 ; CHECK-NEXT:          .byte   1
320 ; CHECK-NEXT:          .byte   1
321 ; CHECK-NEXT:          .byte   5
322 ; CHECK-NEXT:          .byte   3
323 ; CHECK-NEXT:          .byte   6
324 ; CHECK-NEXT:          .byte   0                               # Set address to L..tmp6
325 ; CHECK-NEXT:          .byte   5
326 ; CHECK-NEXT:          .byte   2
327 ; CHECK-NEXT:          .vbyte  4, L..tmp6
328 ; CHECK-NEXT:          .byte   3                               # Advance line 0
329 ; CHECK-NEXT:          .byte   0
330 ; CHECK-NEXT:          .byte   1
331 ; CHECK-NEXT:          .byte   0                               # Set address to L..sec_end0
332 ; CHECK-NEXT:          .byte   5
333 ; CHECK-NEXT:          .byte   2
334 ; CHECK-NEXT:          .vbyte  4, L..sec_end0
335 ; CHECK-NEXT:          .byte   0                               # End sequence
336 ; CHECK-NEXT:          .byte   1
337 ; CHECK-NEXT:          .byte   1
338 ; CHECK-NEXT:  L..debug_line_end0: