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