@@ -187,7 +187,7 @@ define void @my_async_function_pa(i8* %ctxt, %async.task* %task, %async.actor* %
187
187
i32 128 ; Initial async context size without space for frame
188
188
}>
189
189
190
- define swiftcc void @my_async_function2 (%async.task* %task , %async.actor* %actor , i8* %async.ctxt ) {
190
+ define swiftcc void @my_async_function2 (%async.task* %task , %async.actor* %actor , i8* %async.ctxt ) !dbg !6 {
191
191
entry:
192
192
193
193
%id = call token @llvm.coro.id.async (i32 128 , i32 16 , i32 2 , i8* bitcast (<{i32 , i32 }>* @my_async_function2_fp to i8* ))
@@ -210,7 +210,7 @@ entry:
210
210
i8* %resume.func_ptr ,
211
211
i8* %resume_proj_fun ,
212
212
void (i8* , i8* , %async.task* , %async.actor* )* @my_async_function.my_other_async_function_fp.apply ,
213
- i8* %callee , i8* %callee_context , %async.task* %task , %async.actor * %actor )
213
+ i8* %callee , i8* %callee_context , %async.task* %task , %async.actor * %actor ), !dbg !9
214
214
215
215
%continuation_task_arg = extractvalue {i8* , i8* , i8* } %res , 0
216
216
%task.2 = bitcast i8* %continuation_task_arg to %async.task*
@@ -239,7 +239,8 @@ entry:
239
239
unreachable
240
240
}
241
241
242
- ; CHECK-LABEL: define swiftcc void @my_async_function2(%async.task* %task, %async.actor* %actor, i8* %async.ctxt) {
242
+ ; CHECK-LABEL: define swiftcc void @my_async_function2(%async.task* %task, %async.actor* %actor, i8* %async.ctxt)
243
+ ; CHECK-SAME: !dbg ![[SP3:[0-9]+]]
243
244
; CHECK: store i8* %async.ctxt,
244
245
; CHECK: store %async.actor* %actor,
245
246
; CHECK: store %async.task* %task,
@@ -250,7 +251,8 @@ entry:
250
251
; CHECK: tail call swiftcc void @asyncSuspend(i8* [[CALLEE_CTXT]], %async.task* %task, %async.actor* %actor)
251
252
; CHECK: ret void
252
253
253
- ; CHECK-LABEL: define internal swiftcc void @my_async_function2.resume.0(i8* %0, i8* nocapture readnone %1, i8* nocapture readonly %2) {
254
+ ; CHECK-LABEL: define internal swiftcc void @my_async_function2.resume.0(i8* %0, i8* nocapture readnone %1, i8* nocapture readonly %2)
255
+ ; CHECK-SAME: !dbg ![[SP4:[0-9]+]]
254
256
; CHECK: [[CALLEE_CTXT_ADDR:%.*]] = bitcast i8* %2 to i8**
255
257
; CHECK: [[CALLEE_CTXT:%.*]] = load i8*, i8** [[CALLEE_CTXT_ADDR]]
256
258
; CHECK: [[CALLEE_CTXT_SPILL_ADDR:%.*]] = getelementptr inbounds i8, i8* [[CALLEE_CTXT]], i64 152
@@ -260,7 +262,7 @@ entry:
260
262
; CHECK: tail call swiftcc void @asyncSuspend(i8* [[CALLEE_CTXT_RELOAD]]
261
263
; CHECK: ret void
262
264
263
- ; CHECK-LABEL: define internal swiftcc void @my_async_function2.resume.1(i8* nocapture readonly %0, i8* %1, i8* nocapture readnone %2) {
265
+ ; CHECK-LABEL: define internal swiftcc void @my_async_function2.resume.1(i8* nocapture readonly %0, i8* %1, i8* nocapture readnone %2)
264
266
; CHECK: bitcast i8* %0 to i8**
265
267
; CHECK: [[ACTOR_ARG:%.*]] = bitcast i8* %1
266
268
; CHECK: tail call swiftcc void @asyncReturn({{.*}}[[ACTOR_ARG]])
@@ -550,3 +552,17 @@ declare void @llvm.coro.async.size.replace(i8*, i8*)
550
552
!3 = !DIFile (filename: "/tmp/1.swift" , directory: "/" )
551
553
!4 = !DISubroutineType (types: !{})
552
554
!5 = !DILocation (line: 2 , column: 0 , scope: !1 )
555
+
556
+ ; CHECK: ![[SP3]] = distinct !DISubprogram(name: "my_async_function2",
557
+ ; CHECK-SAME: linkageName: "my_async_function2",
558
+ ; CHECK-SAME: scopeLine: 1
559
+ !6 = distinct !DISubprogram (name: "my_async_function2" ,
560
+ linkageName: "my_async_function2" ,
561
+ scope: !2 , file: !3 , line: 1 , type: !4 ,
562
+ scopeLine: 1 , spFlags: DISPFlagDefinition, unit: !2 )
563
+ ; CHECK: ![[SP4]] = distinct !DISubprogram(name: "my_async_function2",
564
+ ; CHECK-SAME: linkageName: "my_async_function2.resume.0",
565
+ ; CHECK-SAME: scopeLine: 1
566
+ !7 = !DILexicalBlockFile (scope: !6 , file: !8 , discriminator: 0 )
567
+ !8 = !DIFile (filename: "/tmp/fake.cpp" , directory: "/" )
568
+ !9 = !DILocation (line: 2 , column: 0 , scope: !7 )
0 commit comments