Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/DebugInfo/X86/abstract_origin.ll

raw
1 ; RUN: llvm-as < %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -o %t.spv
3 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o - | llvm-dis -o %t.ll
4
5 ; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s
6 ; Generated at -O2 from:
7 ; void f();
8 ; __attribute__((always_inline)) void g() {
9 ; f();
10 ; }
11 ; void h() {
12 ; g();
13 ; };
14 ; CHECK: DW_TAG_subprogram
15 ; CHECK: DW_AT_abstract_origin {{.*}}"g"
16 ; CHECK-NOT: DW_AT_abstract_origin {{.*}}"g"
17 ; CHECK: DW_TAG
18 source_filename = "test.c"
19 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
20 target triple = "spir64-unknown-unknown"
21
22 ; Function Attrs: alwaysinline nounwind ssp uwtable
23 define void @g() #0 !dbg !7 {
24 entry:
25 tail call void (...) @f() #3, !dbg !10
26 ret void, !dbg !11
27 }
28
29 declare void @f(...)
30
31 ; Function Attrs: nounwind ssp uwtable
32 define void @h() #2 !dbg !12 {
33 entry:
34 tail call void (...) @f() #3, !dbg !13
35 ret void, !dbg !15
36 }
37
38 attributes #0 = { alwaysinline nounwind ssp uwtable }
39 attributes #2 = { nounwind ssp uwtable }
40 attributes #3 = { nounwind }
41
42 !llvm.dbg.cu = !{!0}
43 !llvm.module.flags = !{!3, !4, !5}
44 !llvm.ident = !{!6}
45
46 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
47 !1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/llvm")
48 !2 = !{}
49 !3 = !{i32 2, !"Dwarf Version", i32 2}
50 !4 = !{i32 2, !"Debug Info Version", i32 3}
51 !5 = !{i32 1, !"PIC Level", i32 2}
52 !6 = !{!"clang version 3.9.0 "}
53 !7 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: true, unit: !0, retainedNodes: !2)
54 !8 = !DISubroutineType(types: !9)
55 !9 = !{null}
56 !10 = !DILocation(line: 3, column: 3, scope: !7)
57 !11 = !DILocation(line: 4, column: 1, scope: !7)
58 !12 = distinct !DISubprogram(name: "h", scope: !1, file: !1, line: 5, type: !8, isLocal: false, isDefinition: true, scopeLine: 5, isOptimized: true, unit: !0, retainedNodes: !2)
59 !13 = !DILocation(line: 3, column: 3, scope: !7, inlinedAt: !14)
60 !14 = distinct !DILocation(line: 6, column: 3, scope: !12)
61 !15 = !DILocation(line: 7, column: 1, scope: !12)