Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/DebugInfo/X86/unattached-global.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 -o - %t.ll | llvm-dwarfdump - | FileCheck %s
6
7 target datalayout = "e-p:64:64"
8 target triple = "spir64-unknown-unknown"
9
10 ; CHECK: DW_TAG_variable
11 ; CHECK: DW_AT_name {{.*}}"a"
12 ; CHECK-NOT: DW_AT_location
13 ; CHECK: DW_TAG
14
15 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang", file: !5, globals: !1, emissionKind: FullDebug)
16 !1 = !{!2}
17 !2 = !DIGlobalVariableExpression(var: !3, expr: !4)
18 !3 = distinct !DIGlobalVariable(name: "a", scope: null, isLocal: false, isDefinition: true, type: !6)
19 !4 = !DIExpression(DW_OP_plus_uconst, 4)
20 !5 = !DIFile(filename: "<stdin>", directory: "/")
21 !6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
22
23 !7 = !{i32 2, !"Dwarf Version", i32 2}
24 !8 = !{i32 2, !"Debug Info Version", i32 3}
25
26 !llvm.dbg.cu = !{!0}
27 !llvm.module.flags = !{!7, !8}