1 ; REQUIRES: x86-registered-target
2 ; RUN: llvm-as < %s | llvm-dis | FileCheck %s
4 ; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone uwtable willreturn
5 define dso_local i32 @f(i32 %a) local_unnamed_addr #0 !dbg !8 {
7 call void @llvm.dbg.value(metadata i32 %a, metadata !13, metadata !DIExpression()), !dbg !17
11 ; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
12 declare void @llvm.dbg.value(metadata, metadata, metadata) #1
14 attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone uwtable willreturn "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
15 attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
18 !llvm.module.flags = !{!3, !4, !5, !6}
21 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 13.0.0 (https://github.com/llvm/llvm-project.git a6dd9d402a04d53403664bbb47771f2573c7ade0)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
22 !1 = !DIFile(filename: "func.c", directory: "/home/yhs/work/tests/llvm/btf_tag")
24 !3 = !{i32 7, !"Dwarf Version", i32 4}
25 !4 = !{i32 2, !"Debug Info Version", i32 3}
26 !5 = !{i32 1, !"wchar_size", i32 4}
27 !6 = !{i32 7, !"uwtable", i32 1}
28 !7 = !{!"clang version 13.0.0 (https://github.com/llvm/llvm-project.git a6dd9d402a04d53403664bbb47771f2573c7ade0)"}
29 !8 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !9, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12, annotations: !14)
30 !9 = !DISubroutineType(types: !10)
32 !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
34 !13 = !DILocalVariable(name: "a", arg: 1, scope: !8, file: !1, line: 1, type: !11)
36 !15 = !{!"btf_decl_tag", !"a"}
37 !16 = !{!"btf_decl_tag", !"b"}
39 ; CHECK: distinct !DISubprogram(name: "f"
40 ; CHECK-SAME: annotations: ![[ANNOT:[0-9]+]]
41 ; CHECK: ![[ANNOT]] = !{![[TAG1:[0-9]+]], ![[TAG2:[0-9]+]]}
42 ; CHECK: ![[TAG1]] = !{!"btf_decl_tag", !"a"}
43 ; CHECK: ![[TAG2]] = !{!"btf_decl_tag", !"b"}
45 !17 = !DILocation(line: 0, scope: !8)
46 !18 = !DILocation(line: 1, column: 77, scope: !8)