Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/DebugInfo/X86/mixed-nodebug-cu.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 %t.ll -o %t -filetype=obj
6 ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
7 ; CHECK: DW_TAG_compile_unit
8 ; CHECK: DW_TAG_subprogram
9 ; CHECK: DW_AT_name{{.*}}"f"
10 ; CHECK: DW_TAG_compile_unit
11 ;
12 ; created from
13 ; void f() {} // compile with -g
14 ; void g() {} // compile with -Rpass=inline
15 ; and llvm-linking the result.
16
17 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
18 target triple = "spir64-unknown-unknown"
19
20 ; Function Attrs: nounwind ssp uwtable
21 define void @f() #0 !dbg !4 {
22 entry:
23 ret void, !dbg !15
24 }
25
26 ; Function Attrs: nounwind ssp uwtable
27 define void @g() #0 !dbg !9 {
28 entry:
29 ret void, !dbg !16
30 }
31
32 attributes #0 = { nounwind ssp uwtable }
33
34 !llvm.dbg.cu = !{!0, !7}
35 !llvm.ident = !{!11, !11}
36 !llvm.module.flags = !{!12, !13, !14}
37
38 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
39 !1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/llvm")
40 !2 = !{}
41 !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, retainedNodes: !2)
42 !5 = !DISubroutineType(types: !6)
43 !6 = !{null}
44 !7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2)
45 !9 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !7, retainedNodes: !2)
46 !10 = !DISubroutineType(types: !2)
47 !11 = !{!"clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)"}
48 !12 = !{i32 2, !"Dwarf Version", i32 2}
49 !13 = !{i32 2, !"Debug Info Version", i32 3}
50 !14 = !{i32 1, !"PIC Level", i32 2}
51 !15 = !DILocation(line: 1, column: 12, scope: !4)
52 !16 = !DILocation(line: 1, column: 12, scope: !9)