Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/DebugInfo/Generic/namespace_function_definition.ll

raw
1 ; REQUIRES: object-emission
2
3 ; RUN: llvm-as < %s -o %t.bc
4 ; RUN: llvm-spirv %t.bc -o %t.spv
5 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o - | llvm-dis -o %t.ll
6
7 ; RUN: llc -mtriple=%triple -O0 -filetype=obj -dwarf-linkage-names=All < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s
8
9 target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
10 target triple = "spir64-unknown-unknown"
11
12 ; Generated from clang with the following source:
13 ; namespace ns {
14 ; void func() {
15 ; }
16 ; }
17
18 ; CHECK: DW_TAG_namespace
19 ; CHECK-NEXT: DW_AT_name {{.*}} "ns"
20 ; CHECK: DW_TAG_subprogram
21 ; CHECK-NOT: DW_TAG
22 ; CHECK: DW_AT_low_pc
23 ; CHECK-NOT: DW_TAG
24 ; CHECK: DW_AT_linkage_name {{.*}} "_ZN2ns4funcEv"
25 ; CHECK: NULL
26 ; CHECK: NULL
27
28 ; Function Attrs: nounwind uwtable
29 define void @_ZN2ns4funcEv() #0 !dbg !4 {
30 entry:
31 ret void, !dbg !11
32 }
33
34 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
35
36 !llvm.dbg.cu = !{!0}
37 !llvm.module.flags = !{!8, !9}
38 !llvm.ident = !{!10}
39
40 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
41 !1 = !DIFile(filename: "namespace_function_definition.cpp", directory: "/tmp/dbginfo")
42 !2 = !{}
43 !4 = distinct !DISubprogram(name: "func", linkageName: "_ZN2ns4funcEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, retainedNodes: !2)
44 !5 = !DINamespace(name: "ns", scope: null)
45 !6 = !DISubroutineType(types: !7)
46 !7 = !{null}
47 !8 = !{i32 2, !"Dwarf Version", i32 4}
48 !9 = !{i32 1, !"Debug Info Version", i32 3}
49 !10 = !{!"clang version 3.5.0 "}
50 !11 = !DILocation(line: 3, scope: !4)