92 lines · plain
1; RUN: llc -split-dwarf-file=foo.dwo -mtriple=x86_64-unknown-linux-gnu -filetype=obj %s -o %t322; RUN: llvm-dwarfdump -v -debug-info -debug-rnglists %t32 | \3; RUN: FileCheck %s --check-prefixes=CHECK,DWARF32,CHECK-ELF4 5; RUN: llc -split-dwarf-file=foo.dwo -mtriple=x86_64-unknown-win32-gnu -filetype=obj %s -o %t326; RUN: llvm-dwarfdump -v -debug-info -debug-rnglists %t32 | \7; RUN: FileCheck %s --check-prefixes=CHECK,DWARF32,CHECK-COFF8 9; RUN: llc -dwarf64 -split-dwarf-file=foo.dwo -mtriple=x86_64-unknown-linux-gnu -filetype=obj %s -o %t6410; RUN: llvm-dwarfdump -v -debug-info -debug-rnglists %t64 | \11; RUN: FileCheck %s --check-prefixes=CHECK,DWARF64,CHECK-ELF12 13; CHECK: .debug_info contents:14; CHECK: .debug_info.dwo contents:15; CHECK: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x[[#%.8x,RNG_OFF:]]16; CHECK-ELF: [0x[[#%.16x,BEGIN1:0x01]], 0x[[#%.16x,END1:0x0c]]) ".text"17; CHECK-ELF: [0x[[#%.16x,BEGIN2:0x0e]], 0x[[#%.16x,END2:0x13]]) ".text")18; CHECK-COFF: [0x[[#%.16x,BEGIN1:0x04]], 0x[[#%.16x,END1:0x0f]]) ".text"19; CHECK-COFF: [0x[[#%.16x,BEGIN2:0x11]], 0x[[#%.16x,END2:0x17]]) ".text")20 21; CHECK: .debug_rnglists.dwo contents:22; DWARF32: 0x00000000: range list header: length = 0x00000015, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x0000000123; DWARF64: 0x00000000: range list header: length = 0x0000000000000019, format = DWARF64, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x0000000124; CHECK: offsets: [25; DWARF32: 0x00000004 => 0x[[#RNG_OFF]]26; DWARF64: 0x0000000000000008 => 0x[[#RNG_OFF]]27; CHECK: ]28; CHECK: ranges:29; CHECK: 0x[[#RNG_OFF]]: [DW_RLE_base_addressx]: 0x000000000000000030; CHECK: 0x[[#RNG_OFF+2]]: [DW_RLE_offset_pair ]: 0x[[#%.16x,BEGIN1]], 0x[[#%.16x,END1]] => [0x[[#%.16x,BEGIN1]], 0x[[#%.16x,END1]])31; CHECK: 0x[[#RNG_OFF+5]]: [DW_RLE_offset_pair ]: 0x[[#%.16x,BEGIN2]], 0x[[#%.16x,END2]] => [0x[[#%.16x,BEGIN2]], 0x[[#%.16x,END2]])32; CHECK: 0x[[#RNG_OFF+8]]: [DW_RLE_end_of_list ]33 34; Function Attrs: noinline optnone uwtable35define dso_local void @_Z2f3v() !dbg !7 {36entry:37 %x = alloca i32, align 438 call void @llvm.dbg.declare(metadata ptr %x, metadata !10, metadata !DIExpression()), !dbg !1339 %call = call i32 @_Z2f2v(), !dbg !1440 store i32 %call, ptr %x, align 4, !dbg !1341 %0 = load i32, ptr %x, align 4, !dbg !1342 %tobool = icmp ne i32 %0, 0, !dbg !1343 br i1 %tobool, label %if.then, label %if.end, !dbg !1544 45if.then: ; preds = %entry46 call void @_Z2f1v(), !dbg !1647 br label %if.end, !dbg !1848 49if.end: ; preds = %if.then, %entry50 ret void, !dbg !1951}52 53; Function Attrs: nounwind readnone speculatable54declare void @llvm.dbg.declare(metadata, metadata, metadata)55 56declare dso_local i32 @_Z2f2v()57 58declare dso_local void @_Z2f1v()59 60; Function Attrs: noinline nounwind optnone uwtable61define dso_local void @_Z2f4v() #3 section "x" !dbg !20 {62entry:63 ret void, !dbg !2164}65 66!llvm.dbg.cu = !{!0}67!llvm.module.flags = !{!3, !4, !5}68!llvm.ident = !{!6}69 70!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 8.0.0 (trunk 344806) (llvm/trunk 344835)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: GNU)71!1 = !DIFile(filename: "ranges.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch", checksumkind: CSK_MD5, checksum: "a1e825b91fba21d696f05eb06d440aa3")72!2 = !{}73!3 = !{i32 2, !"Dwarf Version", i32 5}74!4 = !{i32 2, !"Debug Info Version", i32 3}75!5 = !{i32 1, !"wchar_size", i32 4}76!6 = !{!"clang version 8.0.0 (trunk 344806) (llvm/trunk 344835)"}77!7 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !1, file: !1, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)78!8 = !DISubroutineType(types: !9)79!9 = !{null}80!10 = !DILocalVariable(name: "x", scope: !11, file: !1, line: 4, type: !12)81!11 = distinct !DILexicalBlock(scope: !7, file: !1, line: 4, column: 11)82!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)83!13 = !DILocation(line: 4, column: 11, scope: !11)84!14 = !DILocation(line: 4, column: 15, scope: !11)85!15 = !DILocation(line: 4, column: 11, scope: !7)86!16 = !DILocation(line: 5, column: 5, scope: !17)87!17 = distinct !DILexicalBlock(scope: !11, file: !1, line: 4, column: 21)88!18 = !DILocation(line: 6, column: 3, scope: !17)89!19 = !DILocation(line: 7, column: 1, scope: !7)90!20 = distinct !DISubprogram(name: "f4", linkageName: "_Z2f4v", scope: !1, file: !1, line: 8, type: !8, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)91!21 = !DILocation(line: 8, column: 42, scope: !20)92