noscopes.ll 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. ; REQUIRES: object-emission
  2. ; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump - | FileCheck %s
  3. ; Just because there are no scopes/locations on any instructions in the
  4. ; function doesn't mean we can't describe the address range of the function.
  5. ; Check that we do that
  6. ; CHECK: DW_TAG_subprogram
  7. ; CHECK-NOT: TAG
  8. ; CHECK: DW_AT_low_pc
  9. ; Function Attrs: nounwind uwtable
  10. define void @f() #0 !dbg !6 {
  11. entry:
  12. ret void
  13. }
  14. !llvm.dbg.cu = !{!0}
  15. !llvm.module.flags = !{!3, !4}
  16. !llvm.ident = !{!5}
  17. !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 4.0.0 (trunk 289692) (llvm/trunk 289697)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
  18. !1 = !DIFile(filename: "noscopes.c", directory: "/tmp/dbginfo")
  19. !2 = !{}
  20. !3 = !{i32 2, !"Dwarf Version", i32 4}
  21. !4 = !{i32 2, !"Debug Info Version", i32 3}
  22. !5 = !{!"clang version 4.0.0 (trunk 289692) (llvm/trunk 289697)"}
  23. !6 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, retainedNodes: !2)
  24. !7 = !DISubroutineType(types: !8)
  25. !8 = !{null}
  26. !9 = !DILocation(line: 2, column: 1, scope: !6)