84 lines · plain
1; RUN: llc -mtriple=mips-linux-gnu -filetype=asm -asm-verbose=0 -O0 -relocation-model=pic < %s | FileCheck %s2; RUN: llc -mtriple=mips-linux-gnu -filetype=obj -O0 < %s | llvm-dwarfdump -debug-line - | FileCheck %s --check-prefix=INT3 4; Mips used to generate 'jumpy' debug line info around calls. The address5; calculation for each call to f1() would share the same line info so it would6; emit output of the form:7; .loc $first_call_location8; .. address calculation ..9; .. function call ..10; .. address calculation ..11; .loc $second_call_location12; .. function call ..13; .loc $first_call_location14; .. address calculation ..15; .loc $third_call_location16; .. function call ..17; ...18; which would cause confusing stepping behaviour for the end user.19;20; This test checks that we emit more user friendly debug line info of the form:21; .loc $first_call_location22; .. address calculation ..23; .. function call ..24; .loc $second_call_location25; .. address calculation ..26; .. function call ..27; .loc $third_call_location28; .. address calculation ..29; .. function call ..30; ...31;32; Generated with clang from fn-call-line.c:33; void f1();34; void f2() {35; f1();36; f1();37; }38 39; CHECK: .loc 1 3 340; CHECK-NOT: .loc41; CHECK: %call16(f1) 42; CHECK-NOT: .loc43; CHECK: .loc 1 4 344; CHECK-NOT: .loc45; CHECK: %call16(f1) 46 47; INT: {{^}}Address48; INT: -----49; INT-NEXT: 2 0 1 0 0 0 is_stmt{{$}}50; INT-NEXT: 3 3 1 0 0 0 is_stmt prologue_end{{$}}51; INT-NEXT: 4 3 1 0 0 0 is_stmt{{$}}52 53 54; Function Attrs: nounwind uwtable55define void @f2() #0 !dbg !4 {56entry:57 call void (...) @f1(), !dbg !1158 call void (...) @f1(), !dbg !1259 ret void, !dbg !1360}61 62declare void @f1(...) #163 64attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }65attributes #1 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }66 67!llvm.dbg.cu = !{!0}68!llvm.module.flags = !{!8, !9}69!llvm.ident = !{!10}70 71!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 226641)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)72!1 = !DIFile(filename: "fn-call-line.c", directory: "/tmp/dbginfo")73!2 = !{}74!4 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, retainedNodes: !2)75!5 = !DIFile(filename: "fn-call-line.c", directory: "/tmp/dbginfo")76!6 = !DISubroutineType(types: !7)77!7 = !{null}78!8 = !{i32 2, !"Dwarf Version", i32 4}79!9 = !{i32 2, !"Debug Info Version", i32 3}80!10 = !{!"clang version 3.7.0 (trunk 226641)"}81!11 = !DILocation(line: 3, column: 3, scope: !4)82!12 = !DILocation(line: 4, column: 3, scope: !4)83!13 = !DILocation(line: 5, column: 1, scope: !4)84