1; RUN: llc -generate-arange-section -split-dwarf-file=foo.dwo -O0 < %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj > %t 2; RUN: llvm-dwarfdump -v -debug-aranges %t | FileCheck %s 3 4; Test that only one entry is emmitted in .debug_aranges per CU. 5 6; struct foo { 7; static void f2(); 8; static void f3(...); 9; }; 10; 11; void foo::f3(...) { 12; f2(); 13; } 14 15; Check that we emit only one entry in .debug_aranges 16 17; CHECK: cu_offset 18; CHECK-NOT: cu_offset 19 20; Function Attrs: mustprogress noinline optnone uwtable 21define dso_local void @_ZN3foo2f3Ez(...) #0 align 2 !dbg !8 { 22entry: 23 call void @_ZN3foo2f2Ev(), !dbg !18 24 ret void, !dbg !19 25} 26 27declare dso_local void @_ZN3foo2f2Ev() #1 28 29attributes #0 = { mustprogress noinline optnone uwtable "frame-pointer"="all" "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" } 30attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } 31 32!llvm.dbg.cu = !{!0} 33!llvm.module.flags = !{!2, !3, !4, !5, !6} 34!llvm.ident = !{!7} 35 36!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "main.dwo", emissionKind: FullDebug, nameTableKind: GNU) 37!1 = !DIFile(filename: "main.cpp", directory: "/tmp/dbginfo") 38!2 = !{i32 7, !"Dwarf Version", i32 5} 39!3 = !{i32 2, !"Debug Info Version", i32 3} 40!4 = !{i32 1, !"wchar_size", i32 4} 41!5 = !{i32 7, !"uwtable", i32 1} 42!6 = !{i32 7, !"frame-pointer", i32 2} 43!7 = !{!"clang version 14.0.0"} 44!8 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ez", scope: !9, file: !1, line: 6, type: !15, scopeLine: 6, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, declaration: !14, retainedNodes: !17) 45!9 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !1, line: 1, size: 8, flags: DIFlagTypePassByValue, elements: !10, identifier: "_ZTS3foo") 46!10 = !{!11, !14} 47!11 = !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !9, file: !1, line: 2, type: !12, scopeLine: 2, flags: DIFlagPrototyped | DIFlagStaticMember, spFlags: 0) 48!12 = !DISubroutineType(types: !13) 49!13 = !{null} 50!14 = !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ez", scope: !9, file: !1, line: 3, type: !15, scopeLine: 3, flags: DIFlagPrototyped | DIFlagStaticMember, spFlags: 0) 51!15 = !DISubroutineType(types: !16) 52!16 = !{null, null} 53!17 = !{} 54!18 = !DILocation(line: 7, column: 6, scope: !8) 55!19 = !DILocation(line: 8, column: 2, scope: !8) 56