1; RUN: llc -disable-debug-info-print=true -exception-model=dwarf -o - %s | FileCheck %s
2; RUN: llc -disable-debug-info-print=true -exception-model=sjlj -o - %s | FileCheck %s --check-prefix=SJLJ-CHECK
3
4define i16 @main() nounwind !dbg !7 {
5entry:
6  ret i16 0, !dbg !9
7}
8
9define i16 @helper() !dbg !10 {
10entry:
11  ret i16 0, !dbg !11
12}
13
14
15; CHECK: main
16; CHECK-NOT: cfi_startproc
17; CHECK-NOT: .file
18; CHECK-NOT: .loc
19; CHECK: helper
20; CHECK: cfi_startproc
21; CHECK-NOT: .file
22; CHECK-NOT: .loc
23; CHECK: cfi_endproc
24
25; SJLJ-CHECK: main
26; SJLJ-CHECK-NOT: cfi_startproc
27; SJLJ-CHECK-NOT: .file
28; SJLJ-CHECK-NOT: .loc
29; SJLJ-CHECK: helper
30; SJLJ-CHECK-NOT: cfi_startproc
31; SJLJ-CHECK-NOT: .file
32; SJLJ-CHECK-NOT: .loc
33
34
35!llvm.dbg.cu = !{!0}
36!llvm.module.flags = !{!3, !4, !5}
37!llvm.ident = !{!6}
38
39!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, splitDebugInlining: false, nameTableKind: None)
40!1 = !DIFile(filename: "unwind-tables.c", directory: "/tmp")
41!2 = !{}
42!3 = !{i32 7, !"Dwarf Version", i32 4}
43!4 = !{i32 2, !"Debug Info Version", i32 3}
44!5 = !{i32 1, !"wchar_size", i32 4}
45!6 = !{!"clang version 12.0.0"}
46!7 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
47!8 = !DISubroutineType(types: !2)
48!9 = !DILocation(line: 2, column: 3, scope: !7)
49!10 = distinct !DISubprogram(name: "helper", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
50!11 = !DILocation(line: 2, column: 3, scope: !10)
51