Debian Codegraph @

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

raw
1 ; RUN: llvm-as < %s -o %t.bc
2 ; RUN: llvm-spirv --spirv-ext=+SPV_INTEL_debug_module %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=x86_64-apple-macosx %t.ll -o - -filetype=obj \
6 ; RUN: | llvm-dwarfdump -debug-info - | FileCheck %s
7 ; CHECK: DW_TAG_module
8 ; CHECK-NOT: NULL
9 ; CHECK: DW_TAG_structure_type
10
11 ; Hand-crafted based on
12 ; struct s;
13 ; struct s *s;
14
15 source_filename = "test/DebugInfo/X86/DIModuleContext.ll"
16 target triple = "spir64-unknown-unknown"
17
18 %struct.s = type opaque
19
20 @i = common addrspace(1) global %struct.s* null, align 8, !dbg !0
21
22 !llvm.dbg.cu = !{!2}
23 !llvm.module.flags = !{!11, !12}
24
25 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
26 !1 = !DIGlobalVariable(name: "s", scope: !2, file: !3, line: 2, type: !9, isLocal: false, isDefinition: true)
27 !2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, imports: !6)
28 !3 = !DIFile(filename: "test.c", directory: "/")
29 !4 = !{}
30 !5 = !{!0}
31 !6 = !{!7}
32 !7 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !8, file: !3, line: 11)
33 !8 = !DIModule(scope: null, name: "Module", includePath: ".")
34 !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64)
35 !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "s", scope: !8, file: !3, line: 1, flags: DIFlagFwdDecl)
36 !11 = !{i32 2, !"Dwarf Version", i32 2}
37 !12 = !{i32 2, !"Debug Info Version", i32 3}
38