1; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
2
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
16; Function Attrs: nounwind uwtable
17define void @f() #0 !dbg !5 {
18entry:
19  ret void, !dbg !11
20}
21
22attributes #0 = { nounwind uwtable }
23
24!llvm.dbg.cu = !{!0}
25!llvm.module.flags = !{!8, !9}
26
27!0 = distinct !DICompileUnit(language: DW_LANG_Swift, producer: "swiftc", isOptimized: false, emissionKind: FullDebug, file: !1)
28!1 = !DIFile(filename: "f.swift", directory: "/")
29!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "Error")
30!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "DifferentError")
31!5 = distinct !DISubprogram(name: "f", line: 2, isLocal: false, isDefinition: true, unit: !0, scopeLine: 2, file: !1, scope: !1, type: !6, thrownTypes: !{!3, !4})
32!6 = !DISubroutineType(types: !7)
33!7 = !{null}
34!8 = !{i32 2, !"Dwarf Version", i32 4}
35!9 = !{i32 1, !"Debug Info Version", i32 3}
36!11 = !DILocation(line: 3, scope: !5)
37