1; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu < %s -o - -dwarf-version=2 -no-dwarf-ranges-section | FileCheck %s --check-prefix=DISABLED 2; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu < %s -o - -dwarf-version=2 | FileCheck %s 3 4; DISABLED-NOT: {{DW_AT_ranges|.debug_ranges}} 5; DISABLED: .section .debug_info 6; DISABLED-NOT: {{DW_AT_ranges|.section}} 7; DISABLED: .quad .Lfunc_begin0 # DW_AT_low_pc 8; DISABLED-NEXT: .quad .Lfunc_end1 # DW_AT_high_pc 9; DISABLED-NOT: {{DW_AT_ranges|.debug_ranges}} 10 11; .debug_ranges section must be emitted by default 12; CHECK: .section .debug_info 13; CHECK: quad 0 # DW_AT_low_pc 14; CHECK-NEXT: long [[RANGE0:[.]Ldebug_ranges[0-9]+]] # DW_AT_ranges 15; CHECK: .debug_ranges 16; CHECK-NEXT: [[RANGE0]]: 17; CHECK-NEXT: .quad .Lfunc_begin0 18; CHECK-NEXT: .quad .Lfunc_end0 19; CHECK-NEXT: .quad .Lfunc_begin1 20; CHECK-NEXT: .quad .Lfunc_end1 21; CHECK-NEXT: .quad 0 22; CHECK-NEXT: .quad 0 23 24; Function Attrs: noinline nounwind optnone uwtable 25define void @_Z2f1v() #0 section "a" !dbg !7 { 26entry: 27 ret void, !dbg !10 28} 29 30; Function Attrs: noinline nounwind optnone uwtable 31define void @_Z2f2v() #0 section "b" !dbg !11 { 32entry: 33 ret void, !dbg !12 34} 35 36attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } 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 6.0.0 (trunk 309523) (llvm/trunk 309526)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 43!1 = !DIFile(filename: "funcs.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 6.0.0 (trunk 309523) (llvm/trunk 309526)"} 49!7 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) 50!8 = !DISubroutineType(types: !9) 51!9 = !{null} 52!10 = !DILocation(line: 1, column: 42, scope: !7) 53!11 = 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) 54!12 = !DILocation(line: 2, column: 42, scope: !11) 55