1; Check info on linkage. 2 3; RUN: opt -pass-remarks=kernel-info -passes=kernel-info \ 4; RUN: -disable-output %s 2>&1 | \ 5; RUN: FileCheck -match-full-lines %s 6 7target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64" 8target triple = "nvptx64-nvidia-cuda" 9 10; CHECK: remark: test.c:13:0: in artificial function 'extNotKer', ExternalNotKernel = 1 11define external void @extNotKer() !dbg !10 { 12entry: 13 ret void 14} 15 16; CHECK: remark: test.c:23:0: in function 'impNotKer', ExternalNotKernel = 1 17define void @impNotKer() !dbg !20 { 18entry: 19 ret void 20} 21 22; CHECK: remark: test.c:33:0: in artificial function 'weakNotKer', ExternalNotKernel = 0 23define weak void @weakNotKer() !dbg !30 { 24entry: 25 ret void 26} 27 28; CHECK: remark: test.c:43:0: in function 'extPtxKer', ExternalNotKernel = 0 29define external ptx_kernel void @extPtxKer() !dbg !40 { 30entry: 31 ret void 32} 33 34; CHECK: remark: test.c:53:0: in artificial function 'extAmdgpuKer', ExternalNotKernel = 0 35define external amdgpu_kernel void @extAmdgpuKer() !dbg !50 { 36entry: 37 ret void 38} 39 40; CHECK: remark: test.c:63:0: in function 'extSpirKer', ExternalNotKernel = 0 41define external spir_kernel void @extSpirKer() !dbg !60 { 42entry: 43 ret void 44} 45 46; CHECK: remark: test.c:73:0: in artificial function 'weakKer', ExternalNotKernel = 0 47define weak ptx_kernel void @weakKer() !dbg !70 { 48entry: 49 ret void 50} 51 52!llvm.module.flags = !{!0} 53!llvm.dbg.cu = !{!1} 54 55!0 = !{i32 2, !"Debug Info Version", i32 3} 56!1 = distinct !DICompileUnit(language: DW_LANG_C11, file: !2, producer: "clang version 19.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) 57!2 = !DIFile(filename: "test.c", directory: "/tmp") 58!3 = !{null} 59!4 = !{} 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) 69