1; RUN: llc -O0 -filetype=obj -o - %s | llvm-dwarfdump -v - | FileCheck %s 2; 3; Bug 47129 4; XFAIL: target=sparc{{.*}} 5; 6; CHECK: .debug_info contents: 7; CHECK: [[LABEL_ORIGIN:0x[0-9a-zA-Z]+]]:{{ *}}DW_TAG_label 8; CHECK-NEXT: DW_AT_name {{.*}}"top" 9; CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] {{.*}}debug-label-inline.c 10; CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] {{.*}}8 11; CHECK: DW_TAG_label 12; CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4] {{.*}}{[[LABEL_ORIGIN]]} "top" 13; CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] {{.*}}{{0x[0-9a-f]+}} 14 15source_filename = "debug-label-inline.c" 16 17@ga = external local_unnamed_addr global i32, align 4 18@gb = external local_unnamed_addr global i32, align 4 19 20define i32 @f2() local_unnamed_addr #0 !dbg !4 { 21entry: 22 %0 = load i32, ptr @ga, align 4, !dbg !1 23 %1 = load i32, ptr @gb, align 4, !dbg !1 24 call void @llvm.dbg.label(metadata !15), !dbg !17 25 %add.i = add nsw i32 %1, %0, !dbg !18 26 ret i32 %add.i, !dbg !1 27} 28 29declare void @llvm.dbg.label(metadata) 30declare void @llvm.dbg.value(metadata, metadata, metadata) 31 32attributes #0 = { nounwind readonly } 33 34!llvm.dbg.cu = !{!0} 35!llvm.module.flags = !{!3} 36 37!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !6, isOptimized: true, emissionKind: FullDebug, enums: !2) 38!1 = !DILocation(line: 18, scope: !4) 39!2 = !{} 40!3 = !{i32 2, !"Debug Info Version", i32 3} 41!4 = distinct !DISubprogram(name: "f2", scope: !6, file: !6, line: 15, type: !7, isLocal: false, isDefinition: true, scopeLine: 15, isOptimized: true, unit: !0, retainedNodes: !2) 42!6 = !DIFile(filename: "debug-label-inline.c", directory: "./") 43!7 = !DISubroutineType(types: !8) 44!8 = !{!10} 45!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 46!11 = distinct !DISubprogram(name: "f1", scope: !6, file: !6, line: 5, type: !12, isLocal: false, isDefinition: true, scopeLine: 5, isOptimized: true, unit: !0, retainedNodes: !14) 47!12 = !DISubroutineType(types: !13) 48!13 = !{!10, !10, !10} 49!14 = !{!15} 50!15 = !DILabel(scope: !11, name: "top", file: !6, line: 8) 51!16 = distinct !DILocation(line: 18, scope: !4) 52!17 = !DILocation(line: 8, scope: !11, inlinedAt: !16) 53!18 = !DILocation(line: 9, scope: !11, inlinedAt: !16) 54