1 ; RUN: %llc_dwarf -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
2 ; REQUIRES: object-emission
4 ; Generated by clang++ -S -c -std=c++11 --emit-llvm -g from the following C++11 source:
5 ; [[ noreturn ]] void f() {
9 ; CHECK: DW_TAG_subprogram
11 ; CHECK: DW_AT_name{{.*}}"f"
13 ; CHECK: DW_AT_noreturn
15 ; ModuleID = 'test.cpp'
16 source_filename = "test.cpp"
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
18 target triple = "x86_64-unknown-linux-gnu"
20 @_ZTIi = external constant i8*
22 ; Function Attrs: noreturn
23 define void @_Z1fv() #0 !dbg !6 {
25 %exception = call i8* @__cxa_allocate_exception(i64 4) #1, !dbg !9
26 %0 = bitcast i8* %exception to i32*, !dbg !9
27 store i32 1, i32* %0, align 16, !dbg !9
28 call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null) #2, !dbg !10
31 return: ; No predecessors!
35 declare i8* @__cxa_allocate_exception(i64)
37 declare void @__cxa_throw(i8*, i8*, i8*)
39 attributes #0 = { noreturn }
42 !llvm.module.flags = !{!3, !4}
45 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
46 !1 = !DIFile(filename: "test.cpp", directory: "/home/del/test")
48 !3 = !{i32 2, !"Dwarf Version", i32 4}
49 !4 = !{i32 2, !"Debug Info Version", i32 3}
50 !5 = !{!"clang version 4.0.0"}
51 !6 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", scope: !1, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped | DIFlagNoReturn, isOptimized: false, unit: !0, retainedNodes: !2)
52 !7 = !DISubroutineType(types: !8)
54 !9 = !DILocation(line: 2, column: 5, scope: !6)
55 !10 = !DILocation(line: 2, column: 5, scope: !11)
56 !11 = !DILexicalBlockFile(scope: !6, file: !1, discriminator: 1)
57 !12 = !DILocation(line: 3, column: 1, scope: !6)