81 lines · plain
1; RUN: llc -mtriple=x86_64-linux -split-dwarf-file=foo.dwo -filetype=obj -o %t < %s2; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s3 4; CHECK: DW_AT_name ("b.cpp")5; CHECK: DW_TAG_subprogram6; CHECK-NEXT: DW_AT_linkage_name ("_ZN5outer2f2Ev")7; CHECK-NEXT: DW_AT_name ("f2")8; CHECK-NEXT: DW_AT_decl_file (0x02)9; CHECK-NEXT: DW_AT_decl_line (4)10 11; Function Attrs: norecurse nounwind uwtable mustprogress12define dso_local i32 @main() local_unnamed_addr #2 !dbg !26 {13entry:14 tail call void @_Z2f1v() #3, !dbg !2815 tail call void @_Z2f1v() #3, !dbg !3016 ret i32 0, !dbg !3217}18 19; Function Attrs: nounwind uwtable mustprogress20define dso_local void @_ZN5outer2f2Ev() local_unnamed_addr #1 align 2 !dbg !16 {21entry:22 tail call void @_Z2f1v(), !dbg !2123 ret void, !dbg !2224}25 26; Function Attrs: noinline nounwind optnone uwtable mustprogress27define dso_local void @_Z2f1v() local_unnamed_addr #0 !dbg !12 {28entry:29 ret void, !dbg !1530}31 32; Function Attrs: nounwind uwtable mustprogress33define dso_local void @_Z2f2v() local_unnamed_addr #1 !dbg !23 {34entry:35 tail call void @_Z2f1v(), !dbg !2436 ret void, !dbg !2537}38 39attributes #0 = { noinline nounwind optnone uwtable mustprogress "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" }40attributes #1 = { nounwind uwtable mustprogress "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" }41attributes #2 = { norecurse nounwind uwtable mustprogress "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" }42attributes #3 = { nounwind }43 44!llvm.dbg.cu = !{!0, !3}45!llvm.ident = !{!5, !5}46!llvm.module.flags = !{!6, !7, !8, !9, !10, !11}47 48!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 13.0.0 (git@github.com:llvm/llvm-project.git 9aa951e80e72decd95c7d972e1e0dde24260d336)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, debugInfoForProfiling: true, nameTableKind: None)49!1 = !DIFile(filename: "a.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch")50!2 = !{}51!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !4, producer: "clang version 13.0.0 (git@github.com:llvm/llvm-project.git 9aa951e80e72decd95c7d972e1e0dde24260d336)", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, splitDebugInlining: false, debugInfoForProfiling: true, nameTableKind: None)52!4 = !DIFile(filename: "b.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch")53!5 = !{!"clang version 13.0.0 (git@github.com:llvm/llvm-project.git 9aa951e80e72decd95c7d972e1e0dde24260d336)"}54!6 = !{i32 7, !"Dwarf Version", i32 4}55!7 = !{i32 2, !"Debug Info Version", i32 3}56!8 = !{i32 1, !"wchar_size", i32 4}57!9 = !{i32 7, !"uwtable", i32 1}58!10 = !{i32 1, !"ThinLTO", i32 0}59!11 = !{i32 1, !"EnableSplitLTOUnit", i32 1}60!12 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", scope: !1, file: !1, line: 2, type: !13, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)61!13 = !DISubroutineType(types: !14)62!14 = !{null}63!15 = !DILocation(line: 3, column: 1, scope: !12)64!16 = distinct !DISubprogram(name: "f2", linkageName: "_ZN5outer2f2Ev", scope: !17, file: !1, line: 4, type: !13, scopeLine: 4, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !20, retainedNodes: !2)65!17 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "outer", file: !18, line: 1, size: 8, flags: DIFlagTypePassByValue, elements: !19, identifier: "_ZTS5outer")66!18 = !DIFile(filename: "./a.h", directory: "/usr/local/google/home/blaikie/dev/scratch")67!19 = !{!20}68!20 = !DISubprogram(name: "f2", linkageName: "_ZN5outer2f2Ev", scope: !17, file: !18, line: 2, type: !13, scopeLine: 2, flags: DIFlagPrototyped | DIFlagStaticMember, spFlags: DISPFlagOptimized)69!21 = !DILocation(line: 5, column: 3, scope: !16)70!22 = !DILocation(line: 6, column: 1, scope: !16)71!23 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", scope: !1, file: !1, line: 7, type: !13, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)72!24 = !DILocation(line: 8, column: 3, scope: !23)73!25 = !DILocation(line: 9, column: 1, scope: !23)74!26 = distinct !DISubprogram(name: "main", scope: !4, file: !4, line: 2, type: !27, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !3, retainedNodes: !2)75!27 = !DISubroutineType(types: !2)76!28 = !DILocation(line: 5, column: 3, scope: !16, inlinedAt: !29)77!29 = distinct !DILocation(line: 3, column: 3, scope: !26)78!30 = !DILocation(line: 8, column: 3, scope: !23, inlinedAt: !31)79!31 = distinct !DILocation(line: 4, column: 3, scope: !26)80!32 = !DILocation(line: 5, column: 1, scope: !26)81