xref: /llvm-project/llvm/test/DebugInfo/X86/noreturn_c11.ll (revision 01cee921abe924ae98027ce599d3c76ca5780a38)
1; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
2
3; Generated by clang -S -c -std=c++11 --emit-llvm -g from the following C11 source:
4; _Noreturn void f() {
5;   throw 1;
6; }
7
8; CHECK: DW_TAG_subprogram
9; CHECK-NOT: DW_TAG
10; CHECK: DW_AT_name{{.*}}"f"
11; CHECK-NOT: DW_TAG
12; CHECK: DW_AT_noreturn
13
14; ModuleID = './test.c'
15source_filename = "./test.c"
16target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17target triple = "x86_64-unknown-linux-gnu"
18
19; Function Attrs: noreturn
20define void @f() #0 !dbg !6 {
21entry:
22  call void @exit(i32 0) #2, !dbg !10
23  unreachable, !dbg !10
24
25return:                                           ; No predecessors!
26  ret void, !dbg !11
27}
28
29; Function Attrs: noreturn
30declare void @exit(i32) #1
31
32attributes #0 = { noreturn }
33
34!llvm.dbg.cu = !{!0}
35!llvm.module.flags = !{!3, !4}
36!llvm.ident = !{!5}
37
38!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 4.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
39!1 = !DIFile(filename: "test.c", directory: "/home/del/test")
40!2 = !{}
41!3 = !{i32 2, !"Dwarf Version", i32 4}
42!4 = !{i32 2, !"Debug Info Version", i32 3}
43!5 = !{!"clang version 4.0.0"}
44!6 = distinct !DISubprogram(name: "f", scope: !7, file: !7, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagNoReturn, isOptimized: false, unit: !0, retainedNodes: !2)
45!7 = !DIFile(filename: "./test.c", directory: "/home/del/test")
46!8 = !DISubroutineType(types: !9)
47!9 = !{null}
48!10 = !DILocation(line: 5, column: 3, scope: !6)
49!11 = !DILocation(line: 6, column: 1, scope: !6)
50