1; RUN: llc -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - -minimize-addr-in-v5=Default \ 2; RUN: -split-dwarf-file=test.dwo \ 3; RUN: | llvm-dwarfdump -debug-info -debug-addr -debug-rnglists -v - \ 4; RUN: | FileCheck --check-prefix=RANGE %s 5 6; RUN: llc -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - -minimize-addr-in-v5=Disabled \ 7; RUN: -split-dwarf-file=test.dwo \ 8; RUN: | llvm-dwarfdump -debug-info -debug-addr -debug-rnglists -v - \ 9; RUN: | FileCheck --check-prefix=NORANGE %s 10 11; A simpler example than used in ranges_always.ll, since this doesn't test all 12; the nuances of where minimizing ranges are useful. This is only testing the 13; defaulting behavior - specifically that the "ranges" version of the 14; functionality is used when Split DWARF emission occurs (so, when split dwarf is 15; enabled and !(gmlt+!split-dwarf-inlining) (because if the latter is true, then 16; split dwarf emission doesn't occur because it'd be redundant/extra verbose) 17 18; CHECK: DW_TAG_inlined_subroutine 19; CHECK-NOT: {{DW_TAG|NULL}} 20; RANGE: DW_AT_ranges 21; CHECK-NOT: {{DW_TAG|NULL}} 22; NORANGE: DW_AT_low_pc 23; CHECK-NOT: {{DW_TAG|NULL}} 24; NORANGE: DW_AT_high_pc 25; CHECK: NULL 26 27 28; Function Attrs: mustprogress noinline optnone uwtable 29define dso_local void @_Z2f3v() !dbg !10 { 30entry: 31 call void @_Z2f1v(), !dbg !13 32 call void @_Z2f1v(), !dbg !14 33 ret void, !dbg !17 34} 35 36declare void @_Z2f1v() 37 38!llvm.dbg.cu = !{!0} 39!llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !8} 40!llvm.ident = !{!9} 41 42!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 17.0.0 (git@github.com:llvm/llvm-project.git 22afe19ac03f5b5db642cbb8ba7022c2ffc09710)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, splitDebugInlining: false, nameTableKind: None) 43!1 = !DIFile(filename: "test.cpp", directory: "/proc/self/cwd", checksumkind: CSK_MD5, checksum: "77606e6e313660c9c1dac8290849946d") 44!2 = !{i32 7, !"Dwarf Version", i32 5} 45!3 = !{i32 2, !"Debug Info Version", i32 3} 46!4 = !{i32 1, !"wchar_size", i32 4} 47!5 = !{i32 8, !"PIC Level", i32 2} 48!6 = !{i32 7, !"PIE Level", i32 2} 49!7 = !{i32 7, !"uwtable", i32 2} 50!8 = !{i32 7, !"frame-pointer", i32 2} 51!9 = !{!"clang version 17.0.0 (git@github.com:llvm/llvm-project.git 22afe19ac03f5b5db642cbb8ba7022c2ffc09710)"} 52!10 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 5, type: !11, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) 53!11 = !DISubroutineType(types: !12) 54!12 = !{} 55!13 = !DILocation(line: 6, column: 3, scope: !10) 56!14 = !DILocation(line: 3, column: 3, scope: !15, inlinedAt: !16) 57!15 = distinct !DISubprogram(name: "f2", scope: !1, file: !1, line: 2, type: !11, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) 58!16 = distinct !DILocation(line: 7, column: 3, scope: !10) 59!17 = !DILocation(line: 8, column: 1, scope: !10) 60