48 lines · plain
1; RUN: llc -mtriple=x86_64-apple-darwin -filetype=obj %s -o %t2; RUN: llvm-dwarfdump -debug-line %t | FileCheck %s3 4; Check that the line table starts at 7, not 4, but that the first5; statement isn't until line 8.6 7; CHECK-NOT: 0x0000000000000000 7 0 1 0 0 0 is_stmt8; CHECK: 0x0000000000000000 7 0 1 09; CHECK: 0x0000000000000004 8 18 1 0 0 0 is_stmt prologue_end10 11define i32 @callee(i32 %x) nounwind uwtable ssp !dbg !5 {12entry:13 %x.addr = alloca i32, align 414 %y = alloca i32, align 415 store i32 %x, ptr %x.addr, align 416 call void @llvm.dbg.declare(metadata ptr %x.addr, metadata !12, metadata !DIExpression()), !dbg !1317 call void @llvm.dbg.declare(metadata ptr %y, metadata !14, metadata !DIExpression()), !dbg !1618 %0 = load i32, ptr %x.addr, align 4, !dbg !1719 %1 = load i32, ptr %x.addr, align 4, !dbg !1720 %mul = mul nsw i32 %0, %1, !dbg !1721 store i32 %mul, ptr %y, align 4, !dbg !1722 %2 = load i32, ptr %y, align 4, !dbg !1823 %sub = sub nsw i32 %2, 2, !dbg !1824 ret i32 %sub, !dbg !1825}26 27declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone28 29!llvm.dbg.cu = !{!0}30!llvm.module.flags = !{!20}31 32!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 153921) (llvm/trunk 153916)", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !1, retainedTypes: !1, globals: !1, imports: !1)33!1 = !{}34!5 = distinct !DISubprogram(name: "callee", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 7, file: !19, scope: !6, type: !7)35!6 = !DIFile(filename: "ending-run.c", directory: "/Users/echristo/tmp")36!7 = !DISubroutineType(types: !8)37!8 = !{!9, !9}38!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)39!12 = !DILocalVariable(name: "x", line: 5, arg: 1, scope: !5, file: !6, type: !9)40!13 = !DILocation(line: 5, column: 5, scope: !5)41!14 = !DILocalVariable(name: "y", line: 8, scope: !15, file: !6, type: !9)42!15 = distinct !DILexicalBlock(line: 7, column: 1, file: !19, scope: !5)43!16 = !DILocation(line: 8, column: 9, scope: !15)44!17 = !DILocation(line: 8, column: 18, scope: !15)45!18 = !DILocation(line: 9, column: 5, scope: !15)46!19 = !DIFile(filename: "ending-run.c", directory: "/Users/echristo/tmp")47!20 = !{i32 1, !"Debug Info Version", i32 3}48