55
55
}
56
56
57
57
58
- define swiftcc void @my_async_function (i8* %async.ctxt , %async.task* %task , %async.actor* %actor ) {
58
+ define swiftcc void @my_async_function (i8* %async.ctxt , %async.task* %task , %async.actor* %actor ) !dbg !1 {
59
59
entry:
60
60
%tmp = alloca { i64 , i64 }, align 8
61
61
%proj.1 = getelementptr inbounds { i64 , i64 }, { i64 , i64 }* %tmp , i64 0 , i32 0
93
93
i8* %resume.func_ptr ,
94
94
i8* %resume_proj_fun ,
95
95
void (i8* , i8* , %async.task* , %async.actor* )* @my_async_function.my_other_async_function_fp.apply ,
96
- i8* %callee , i8* %callee_context , %async.task* %task , %async.actor * %actor )
96
+ i8* %callee , i8* %callee_context , %async.task* %task , %async.actor * %actor ), !dbg !5
97
97
98
98
call void @llvm.coro.async.context.dealloc (i8* %callee_context )
99
99
%continuation_task_arg = extractvalue {i8* , i8* , i8* } %res , 1
@@ -119,7 +119,8 @@ define void @my_async_function_pa(i8* %ctxt, %async.task* %task, %async.actor* %
119
119
; CHECK: @my_async_function_pa_fp = constant <{ i32, i32 }> <{ {{.*}}, i32 176 }
120
120
; CHECK: @my_async_function2_fp = constant <{ i32, i32 }> <{ {{.*}}, i32 176 }
121
121
122
- ; CHECK-LABEL: define swiftcc void @my_async_function(i8* %async.ctxt, %async.task* %task, %async.actor* %actor) {
122
+ ; CHECK-LABEL: define swiftcc void @my_async_function(i8* %async.ctxt, %async.task* %task, %async.actor* %actor)
123
+ ; CHECK-SAME: !dbg ![[SP1:[0-9]+]] {
123
124
; CHECK: entry:
124
125
; CHECK: [[FRAMEPTR:%.*]] = getelementptr inbounds i8, i8* %async.ctxt, i64 128
125
126
; CHECK: [[ACTOR_SPILL_ADDR:%.*]] = getelementptr inbounds i8, i8* %async.ctxt, i64 152
@@ -148,7 +149,8 @@ define void @my_async_function_pa(i8* %ctxt, %async.task* %task, %async.actor* %
148
149
; CHECK: ret void
149
150
; CHECK: }
150
151
151
- ; CHECK-LABEL: define internal swiftcc void @my_async_function.resume.0(i8* nocapture readonly %0, i8* %1, i8* nocapture readnone %2) {
152
+ ; CHECK-LABEL: define internal swiftcc void @my_async_function.resume.0(i8* nocapture readonly %0, i8* %1, i8* nocapture readnone %2)
153
+ ; CHECK-SAME: !dbg ![[SP2:[0-9]+]] {
152
154
; CHECK: entryresume.0:
153
155
; CHECK: [[CALLER_CONTEXT_ADDR:%.*]] = bitcast i8* %0 to i8**
154
156
; CHECK: [[CALLER_CONTEXT:%.*]] = load i8*, i8** [[CALLER_CONTEXT_ADDR]]
@@ -529,3 +531,23 @@ declare swiftcc void @asyncReturn(i8*, %async.task*, %async.actor*)
529
531
declare swiftcc void @asyncSuspend (i8* , %async.task* , %async.actor* )
530
532
declare i8* @llvm.coro.async.resume ()
531
533
declare void @llvm.coro.async.size.replace (i8* , i8* )
534
+
535
+ !llvm.dbg.cu = !{!2 }
536
+ !llvm.module.flags = !{!0 }
537
+
538
+ !0 = !{i32 2 , !"Debug Info Version" , i32 3 }
539
+ ; CHECK: ![[SP1]] = distinct !DISubprogram(name: "my_async_function",
540
+ ; CHECK-SAME: linkageName: "my_async_function",
541
+ ; CHECK-SAME: scopeLine: 1
542
+ !1 = distinct !DISubprogram (name: "my_async_function" ,
543
+ linkageName: "my_async_function" ,
544
+ scope: !2 , file: !3 , line: 1 , type: !4 ,
545
+ scopeLine: 1 , spFlags: DISPFlagDefinition, unit: !2 )
546
+ ; CHECK: ![[SP2]] = distinct !DISubprogram(name: "my_async_function",
547
+ ; CHECK-SAME: linkageName: "my_async_function",
548
+ ; CHECK-SAME: scopeLine: 2
549
+ !2 = distinct !DICompileUnit (language: DW_LANG_Swift, file: !3 , emissionKind: FullDebug)
550
+ !3 = !DIFile (filename: "/tmp/1.swift" , directory: "/" )
551
+ !4 = !DISubroutineType (types: !{})
552
+ !5 = !DILocation (line: 2 , column: 0 , scope: !1 )
553
+
0 commit comments