thrownTypes.ll 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ; REQUIRES: object-emission
  2. ; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
  3. ; CHECK: DW_TAG_subprogram
  4. ; CHECK: DW_AT_name {{.*}} "f"
  5. ; CHECK-NOT: DW_TAG
  6. ; CHECK: DW_TAG_thrown_type
  7. ; CHECK-NEXT: DW_AT_type {{.*}} {[[ERROR:.*]]}
  8. ; CHECK-NOT: DW_TAG
  9. ; CHECK: DW_TAG_thrown_type
  10. ; CHECK-NEXT: DW_AT_type {{.*}} {[[ERROR2:.*]]}
  11. ; CHECK: [[ERROR]]: DW_TAG_structure_type
  12. ; CHECK-NEXT: DW_AT_name {{.*}} "Error"
  13. ; CHECK: [[ERROR2]]: DW_TAG_structure_type
  14. ; CHECK-NEXT: DW_AT_name {{.*}} "DifferentError"
  15. ; Function Attrs: nounwind uwtable
  16. define void @f() #0 !dbg !5 {
  17. entry:
  18. ret void, !dbg !11
  19. }
  20. attributes #0 = { nounwind uwtable }
  21. !llvm.dbg.cu = !{!0}
  22. !llvm.module.flags = !{!8, !9}
  23. !0 = distinct !DICompileUnit(language: DW_LANG_Swift, producer: "swiftc", isOptimized: false, emissionKind: FullDebug, file: !1)
  24. !1 = !DIFile(filename: "f.swift", directory: "/")
  25. !3 = !DICompositeType(tag: DW_TAG_structure_type, name: "Error")
  26. !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "DifferentError")
  27. !5 = distinct !DISubprogram(name: "f", line: 2, isLocal: false, isDefinition: true, unit: !0, scopeLine: 2, file: !1, scope: !1, type: !6, thrownTypes: !{!3, !4})
  28. !6 = !DISubroutineType(types: !7)
  29. !7 = !{null}
  30. !8 = !{i32 2, !"Dwarf Version", i32 4}
  31. !9 = !{i32 1, !"Debug Info Version", i32 3}
  32. !11 = !DILocation(line: 3, scope: !5)