multiline.ll 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ; RUN: llc -filetype=asm -asm-verbose=0 -O0 < %s | FileCheck %s
  2. ; RUN: llc -filetype=obj -O0 < %s | llvm-dwarfdump -debug-line - | FileCheck %s --check-prefix=INT
  3. ; Check that the assembly output properly handles is_stmt changes. And since
  4. ; we're testing anyway, check the integrated assembler too.
  5. ; Generated with clang from multiline.c:
  6. ; void f1();
  7. ; void f2() {
  8. ; f1(); f1(); f1();
  9. ; f1(); f1(); f1();
  10. ; }
  11. ; CHECK: .loc 1 2 0{{$}}
  12. ; CHECK-NOT: .loc{{ }}
  13. ; CHECK: .loc 1 3 3 prologue_end{{$}}
  14. ; CHECK-NOT: .loc
  15. ; CHECK: .loc 1 3 9 is_stmt 0{{$}}
  16. ; CHECK-NOT: .loc
  17. ; CHECK: .loc 1 3 15{{$}}
  18. ; CHECK-NOT: .loc
  19. ; CHECK: .loc 1 4 3 is_stmt 1{{$}}
  20. ; CHECK-NOT: .loc
  21. ; CHECK: .loc 1 4 9 is_stmt 0{{$}}
  22. ; CHECK-NOT: .loc
  23. ; CHECK: .loc 1 4 15{{$}}
  24. ; CHECK-NOT: .loc
  25. ; CHECK: .loc 1 5 1 is_stmt 1{{$}}
  26. ; INT: {{^}}Address
  27. ; INT: -----
  28. ; INT-NEXT: 2 0 1 0 0 is_stmt{{$}}
  29. ; INT-NEXT: 3 3 1 0 0 is_stmt prologue_end{{$}}
  30. ; INT-NEXT: 3 9 1 0 0 {{$}}
  31. ; INT-NEXT: 3 15 1 0 0 {{$}}
  32. ; INT-NEXT: 4 3 1 0 0 is_stmt{{$}}
  33. ; INT-NEXT: 4 9 1 0 0 {{$}}
  34. ; INT-NEXT: 4 15 1 0 0 {{$}}
  35. ; INT-NEXT: 5 1 1 0 0 is_stmt{{$}}
  36. ; Function Attrs: nounwind uwtable
  37. define void @f2() #0 !dbg !4 {
  38. entry:
  39. call void (...) @f1(), !dbg !11
  40. call void (...) @f1(), !dbg !12
  41. call void (...) @f1(), !dbg !13
  42. call void (...) @f1(), !dbg !14
  43. call void (...) @f1(), !dbg !15
  44. call void (...) @f1(), !dbg !16
  45. ret void, !dbg !17
  46. }
  47. declare void @f1(...) #1
  48. attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
  49. attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
  50. !llvm.dbg.cu = !{!0}
  51. !llvm.module.flags = !{!8, !9}
  52. !llvm.ident = !{!10}
  53. !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk 225000) (llvm/trunk 224999)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
  54. !1 = !DIFile(filename: "multiline.c", directory: "/tmp/dbginfo")
  55. !2 = !{}
  56. !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)
  57. !5 = !DIFile(filename: "multiline.c", directory: "/tmp/dbginfo")
  58. !6 = !DISubroutineType(types: !7)
  59. !7 = !{null}
  60. !8 = !{i32 2, !"Dwarf Version", i32 4}
  61. !9 = !{i32 2, !"Debug Info Version", i32 3}
  62. !10 = !{!"clang version 3.6.0 (trunk 225000) (llvm/trunk 224999)"}
  63. !11 = !DILocation(line: 3, column: 3, scope: !4)
  64. !12 = !DILocation(line: 3, column: 9, scope: !4)
  65. !13 = !DILocation(line: 3, column: 15, scope: !4)
  66. !14 = !DILocation(line: 4, column: 3, scope: !4)
  67. !15 = !DILocation(line: 4, column: 9, scope: !4)
  68. !16 = !DILocation(line: 4, column: 15, scope: !4)
  69. !17 = !DILocation(line: 5, column: 1, scope: !4)