77target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
88target triple = "nvptx64-nvidia-cuda"
99
10- ; CHECK: remark: test.c:3 :0: in function 'f ', ExternalNotKernel = 1
11- define external void @f () !dbg !10 {
10+ ; CHECK: remark: test.c:13 :0: in artificial function 'extNotKer ', ExternalNotKernel = 1
11+ define external void @extNotKer () !dbg !10 {
1212entry:
1313 ret void
1414}
1515
16- ; CHECK: remark: test.c:13 :0: in artificial function 'g ', ExternalNotKernel = 1
17- define void @g () !dbg !20 {
16+ ; CHECK: remark: test.c:23 :0: in function 'impNotKer ', ExternalNotKernel = 1
17+ define void @impNotKer () !dbg !20 {
1818entry:
1919 ret void
2020}
2121
22- ; CHECK: remark: test.c:23 :0: in function 'h ', ExternalNotKernel = 0
23- define external void @h () # 0 !dbg !30 {
22+ ; CHECK: remark: test.c:33 :0: in artificial function 'weakNotKer ', ExternalNotKernel = 0
23+ define weak void @weakNotKer () !dbg !30 {
2424entry:
2525 ret void
2626}
2727
28- ; CHECK: remark: test.c:33 :0: in artificial function 'i ', ExternalNotKernel = 0
29- define weak void @i () !dbg !40 {
28+ ; CHECK: remark: test.c:43 :0: in function 'extPtxKer ', ExternalNotKernel = 0
29+ define external ptx_kernel void @extPtxKer () !dbg !40 {
3030entry:
3131 ret void
3232}
3333
34- attributes #0 = { "kernel" }
34+ ; CHECK: remark: test.c:53:0: in artificial function 'extAmdgpuKer', ExternalNotKernel = 0
35+ define external amdgpu_kernel void @extAmdgpuKer () !dbg !50 {
36+ entry:
37+ ret void
38+ }
39+
40+ ; CHECK: remark: test.c:63:0: in function 'extSpirKer', ExternalNotKernel = 0
41+ define external spir_kernel void @extSpirKer () !dbg !60 {
42+ entry:
43+ ret void
44+ }
45+
46+ ; CHECK: remark: test.c:73:0: in artificial function 'weakKer', ExternalNotKernel = 0
47+ define weak ptx_kernel void @weakKer () !dbg !70 {
48+ entry:
49+ ret void
50+ }
3551
3652!llvm.module.flags = !{!0 }
3753!llvm.dbg.cu = !{!1 }
@@ -41,11 +57,12 @@ attributes #0 = { "kernel" }
4157!2 = !DIFile (filename: "test.c" , directory: "/tmp" )
4258!3 = !{null }
4359!4 = !{}
44- !10 = distinct !DISubprogram (name: "f" , scope: !2 , file: !2 , line: 3 , type: !11 , scopeLine: 3 , spFlags: DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
45- !11 = !DISubroutineType (types: !3 )
46- !20 = distinct !DISubprogram (name: "g" , scope: !2 , file: !2 , line: 13 , type: !21 , scopeLine: 13 , flags: DIFlagArtificial | DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
47- !21 = distinct !DISubroutineType (types: !3 )
48- !30 = distinct !DISubprogram (name: "h" , scope: !2 , file: !2 , line: 23 , type: !31 , scopeLine: 23 , spFlags: DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
49- !31 = distinct !DISubroutineType (types: !3 )
50- !40 = distinct !DISubprogram (name: "i" , scope: !2 , file: !2 , line: 33 , type: !41 , scopeLine: 33 , flags: DIFlagArtificial | DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
51- !41 = distinct !DISubroutineType (types: !3 )
60+ !5 = !DISubroutineType (types: !3 )
61+
62+ !10 = distinct !DISubprogram (name: "extNotKer" , scope: !2 , file: !2 , line: 13 , type: !5 , scopeLine: 13 , flags: DIFlagArtificial, spFlags: DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
63+ !20 = distinct !DISubprogram (name: "impNotKer" , scope: !2 , file: !2 , line: 23 , type: !5 , scopeLine: 23 , spFlags: DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
64+ !30 = distinct !DISubprogram (name: "weakNotKer" , scope: !2 , file: !2 , line: 33 , type: !5 , scopeLine: 33 , flags: DIFlagArtificial, spFlags: DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
65+ !40 = distinct !DISubprogram (name: "extPtxKer" , scope: !2 , file: !2 , line: 43 , type: !5 , scopeLine: 43 , spFlags: DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
66+ !50 = distinct !DISubprogram (name: "extAmdgpuKer" , scope: !2 , file: !2 , line: 53 , type: !5 , scopeLine: 53 , flags: DIFlagArtificial, spFlags: DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
67+ !60 = distinct !DISubprogram (name: "extSpirKer" , scope: !2 , file: !2 , line: 63 , type: !5 , scopeLine: 63 , spFlags: DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
68+ !70 = distinct !DISubprogram (name: "weakKer" , scope: !2 , file: !2 , line: 73 , type: !5 , scopeLine: 73 , flags: DIFlagArtificial, spFlags: DISPFlagDefinition, unit: !1 , retainedNodes: !4 )
0 commit comments