1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-apple-darwin -filetype=obj %s -o %t 2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dwarfdump -debug-dump=line %t | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; Check that the line table starts at 7, not 4, but that the first 5*9880d681SAndroid Build Coastguard Worker; statement isn't until line 8. 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: 0x0000000000000000 7 0 1 0 0 is_stmt 8*9880d681SAndroid Build Coastguard Worker; CHECK: 0x0000000000000000 7 0 1 0 9*9880d681SAndroid Build Coastguard Worker; CHECK: 0x0000000000000004 8 18 1 0 0 is_stmt prologue_end 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Workerdefine i32 @callee(i32 %x) nounwind uwtable ssp !dbg !5 { 12*9880d681SAndroid Build Coastguard Workerentry: 13*9880d681SAndroid Build Coastguard Worker %x.addr = alloca i32, align 4 14*9880d681SAndroid Build Coastguard Worker %y = alloca i32, align 4 15*9880d681SAndroid Build Coastguard Worker store i32 %x, i32* %x.addr, align 4 16*9880d681SAndroid Build Coastguard Worker call void @llvm.dbg.declare(metadata i32* %x.addr, metadata !12, metadata !DIExpression()), !dbg !13 17*9880d681SAndroid Build Coastguard Worker call void @llvm.dbg.declare(metadata i32* %y, metadata !14, metadata !DIExpression()), !dbg !16 18*9880d681SAndroid Build Coastguard Worker %0 = load i32, i32* %x.addr, align 4, !dbg !17 19*9880d681SAndroid Build Coastguard Worker %1 = load i32, i32* %x.addr, align 4, !dbg !17 20*9880d681SAndroid Build Coastguard Worker %mul = mul nsw i32 %0, %1, !dbg !17 21*9880d681SAndroid Build Coastguard Worker store i32 %mul, i32* %y, align 4, !dbg !17 22*9880d681SAndroid Build Coastguard Worker %2 = load i32, i32* %y, align 4, !dbg !18 23*9880d681SAndroid Build Coastguard Worker %sub = sub nsw i32 %2, 2, !dbg !18 24*9880d681SAndroid Build Coastguard Worker ret i32 %sub, !dbg !18 25*9880d681SAndroid Build Coastguard Worker} 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0} 30*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!20} 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker!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*9880d681SAndroid Build Coastguard Worker!1 = !{} 34*9880d681SAndroid Build Coastguard Worker!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*9880d681SAndroid Build Coastguard Worker!6 = !DIFile(filename: "ending-run.c", directory: "/Users/echristo/tmp") 36*9880d681SAndroid Build Coastguard Worker!7 = !DISubroutineType(types: !8) 37*9880d681SAndroid Build Coastguard Worker!8 = !{!9, !9} 38*9880d681SAndroid Build Coastguard Worker!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 39*9880d681SAndroid Build Coastguard Worker!12 = !DILocalVariable(name: "x", line: 5, arg: 1, scope: !5, file: !6, type: !9) 40*9880d681SAndroid Build Coastguard Worker!13 = !DILocation(line: 5, column: 5, scope: !5) 41*9880d681SAndroid Build Coastguard Worker!14 = !DILocalVariable(name: "y", line: 8, scope: !15, file: !6, type: !9) 42*9880d681SAndroid Build Coastguard Worker!15 = distinct !DILexicalBlock(line: 7, column: 1, file: !19, scope: !5) 43*9880d681SAndroid Build Coastguard Worker!16 = !DILocation(line: 8, column: 9, scope: !15) 44*9880d681SAndroid Build Coastguard Worker!17 = !DILocation(line: 8, column: 18, scope: !15) 45*9880d681SAndroid Build Coastguard Worker!18 = !DILocation(line: 9, column: 5, scope: !15) 46*9880d681SAndroid Build Coastguard Worker!19 = !DIFile(filename: "ending-run.c", directory: "/Users/echristo/tmp") 47*9880d681SAndroid Build Coastguard Worker!20 = !{i32 1, !"Debug Info Version", i32 3} 48