70 lines · plain
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 %s5 6; RUN: llc -O0 %s -mtriple=x86_64-unknown-win32-gnu -filetype=obj -o - -minimize-addr-in-v5=Default \7; RUN: -split-dwarf-file=test.dwo \8; RUN: | llvm-dwarfdump -debug-info -debug-addr -debug-rnglists -v - \9; RUN: | FileCheck --check-prefix=RANGE %s10 11; RUN: llc -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - -minimize-addr-in-v5=Disabled \12; RUN: -split-dwarf-file=test.dwo \13; RUN: | llvm-dwarfdump -debug-info -debug-addr -debug-rnglists -v - \14; RUN: | FileCheck --check-prefix=NORANGE %s15 16; RUN: llc -O0 %s -mtriple=x86_64-unknown-win32-gnu -filetype=obj -o - -minimize-addr-in-v5=Disabled \17; RUN: -split-dwarf-file=test.dwo \18; RUN: | llvm-dwarfdump -debug-info -debug-addr -debug-rnglists -v - \19; RUN: | FileCheck --check-prefix=NORANGE %s20 21; A simpler example than used in ranges_always.ll, since this doesn't test all22; the nuances of where minimizing ranges are useful. This is only testing the23; defaulting behavior - specifically that the "ranges" version of the24; functionality is used when Split DWARF emission occurs (so, when split dwarf is25; enabled and !(gmlt+!split-dwarf-inlining) (because if the latter is true, then26; split dwarf emission doesn't occur because it'd be redundant/extra verbose)27 28; CHECK: DW_TAG_inlined_subroutine29; CHECK-NOT: {{DW_TAG|NULL}}30; RANGE: DW_AT_ranges31; CHECK-NOT: {{DW_TAG|NULL}}32; NORANGE: DW_AT_low_pc33; CHECK-NOT: {{DW_TAG|NULL}}34; NORANGE: DW_AT_high_pc35; CHECK: NULL36 37 38; Function Attrs: mustprogress noinline optnone uwtable39define dso_local void @_Z2f3v() !dbg !10 {40entry:41 call void @_Z2f1v(), !dbg !1342 call void @_Z2f1v(), !dbg !1443 ret void, !dbg !1744}45 46declare void @_Z2f1v()47 48!llvm.dbg.cu = !{!0}49!llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !8}50!llvm.ident = !{!9}51 52!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)53!1 = !DIFile(filename: "test.cpp", directory: "/proc/self/cwd", checksumkind: CSK_MD5, checksum: "77606e6e313660c9c1dac8290849946d")54!2 = !{i32 7, !"Dwarf Version", i32 5}55!3 = !{i32 2, !"Debug Info Version", i32 3}56!4 = !{i32 1, !"wchar_size", i32 4}57!5 = !{i32 8, !"PIC Level", i32 2}58!6 = !{i32 7, !"PIE Level", i32 2}59!7 = !{i32 7, !"uwtable", i32 2}60!8 = !{i32 7, !"frame-pointer", i32 2}61!9 = !{!"clang version 17.0.0 (git@github.com:llvm/llvm-project.git 22afe19ac03f5b5db642cbb8ba7022c2ffc09710)"}62!10 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 5, type: !11, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)63!11 = !DISubroutineType(types: !12)64!12 = !{}65!13 = !DILocation(line: 6, column: 3, scope: !10)66!14 = !DILocation(line: 3, column: 3, scope: !15, inlinedAt: !16)67!15 = distinct !DISubprogram(name: "f2", scope: !1, file: !1, line: 2, type: !11, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)68!16 = distinct !DILocation(line: 7, column: 3, scope: !10)69!17 = !DILocation(line: 8, column: 1, scope: !10)70