1; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu %s -o - -use-dwarf-ranges-base-address-specifier | FileCheck %s 2; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu %s -o - | FileCheck %s 3; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu %s -o - -dwarf-version 5 | FileCheck --check-prefix=DWARF5 %s 4 5; CHECK: {{^.Ldebug_ranges0}} 6; CHECK-NEXT: .quad .Ltmp0-.Lfunc_begin0 7; CHECK-NEXT: .quad .Ltmp1-.Lfunc_begin0 8; CHECK-NEXT: .quad .Ltmp2-.Lfunc_begin0 9; CHECK-NEXT: .quad .Ltmp3-.Lfunc_begin0 10; CHECK-NEXT: .quad 0 11; CHECK-NEXT: .quad 0 12 13; DWARF5: {{^.Ldebug_ranges0}} 14; DWARF5-NEXT: # DW_RLE_offset_pair 15; DWARF5-NEXT: .uleb128 .Ltmp0-.Lfunc_begin0 # starting offset 16; DWARF5-NEXT: .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset 17; DWARF5-NEXT: # DW_RLE_offset_pair 18; DWARF5-NEXT: .uleb128 .Ltmp2-.Lfunc_begin0 # starting offset 19; DWARF5-NEXT: .uleb128 .Ltmp3-.Lfunc_begin0 # ending offset 20; DWARF5-NEXT: # DW_RLE_end_of_list 21 22; Function Attrs: noinline optnone uwtable 23define dso_local void @_Z2f2v() !dbg !7 { 24entry: 25 %b = alloca i8, align 1 26 call void @llvm.dbg.declare(metadata ptr %b, metadata !11, metadata !DIExpression()), !dbg !14 27 call void @_Z2f1v(), !dbg !15 28 call void @_Z2f1v(), !dbg !10 29 call void @_Z2f1v(), !dbg !16 30 ret void, !dbg !17 31} 32 33declare dso_local void @_Z2f1v() 34 35; Function Attrs: nounwind readnone speculatable 36declare void @llvm.dbg.declare(metadata, metadata, metadata) 37 38!llvm.dbg.cu = !{!0} 39!llvm.module.flags = !{!3, !4, !5} 40!llvm.ident = !{!6} 41 42!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 7.0.0 (trunk 337388) (llvm/trunk 337392)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 43!1 = !DIFile(filename: "range_reloc_base.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch") 44!2 = !{} 45!3 = !{i32 2, !"Dwarf Version", i32 4} 46!4 = !{i32 2, !"Debug Info Version", i32 3} 47!5 = !{i32 1, !"wchar_size", i32 4} 48!6 = !{!"clang version 7.0.0 (trunk 337388) (llvm/trunk 337392)"} 49!7 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", scope: !1, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) 50!8 = !DISubroutineType(types: !9) 51!9 = !{null} 52!10 = !DILocation(line: 3, column: 3, scope: !7) 53!11 = !DILocalVariable(name: "b", scope: !12, file: !1, line: 5, type: !13) 54!12 = distinct !DILexicalBlock(scope: !7, file: !1, line: 4, column: 3) 55!13 = !DIBasicType(name: "bool", size: 8, encoding: DW_ATE_boolean) 56!14 = !DILocation(line: 5, column: 10, scope: !12) 57!15 = !DILocation(line: 6, column: 5, scope: !12) 58!16 = !DILocation(line: 7, column: 5, scope: !12) 59!17 = !DILocation(line: 9, column: 1, scope: !7) 60