blob: aee57033f431e6ebfd8180bcd67ffae2e7c0cd89 [file] [log] [blame]
Adrian Prantl1eadba12016-12-22 00:45:21 +00001source_filename = "test/DebugInfo/X86/DIModuleContext.ll"
Adrian Prantld2095002015-09-10 17:13:58 +00002target triple = "x86_64-apple-macosx"
David Blaikie01cee922020-11-24 17:45:47 -08003; RUN: llc %s -o - -filetype=obj \
Adrian Prantl7bc1b282017-09-11 22:59:45 +00004; RUN: | llvm-dwarfdump -debug-info - | FileCheck %s
Adrian Prantld2095002015-09-10 17:13:58 +00005; CHECK: DW_TAG_module
6; CHECK-NOT: NULL
7; CHECK: DW_TAG_structure_type
8
9; Hand-crafted based on
10; struct s;
11; struct s *s;
12
13%struct.s = type opaque
14
Adrian Prantl1eadba12016-12-22 00:45:21 +000015@i = common global %struct.s* null, align 8, !dbg !0
Adrian Prantld2095002015-09-10 17:13:58 +000016
Adrian Prantl1eadba12016-12-22 00:45:21 +000017!llvm.dbg.cu = !{!2}
18!llvm.module.flags = !{!11, !12}
Adrian Prantld2095002015-09-10 17:13:58 +000019
Adrian Prantl05782212017-08-30 18:06:51 +000020!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
Adrian Prantl1eadba12016-12-22 00:45:21 +000021!1 = !DIGlobalVariable(name: "s", scope: !2, file: !3, line: 2, type: !9, isLocal: false, isDefinition: true)
22!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, imports: !6)
23!3 = !DIFile(filename: "test.c", directory: "/")
24!4 = !{}
25!5 = !{!0}
26!6 = !{!7}
Adrian Prantld63bfd22017-07-19 00:09:54 +000027!7 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !8, file: !3, line: 11)
Adrian Prantl7b303702020-01-14 13:37:04 -080028!8 = !DIModule(scope: null, name: "Module", includePath: ".")
Adrian Prantl1eadba12016-12-22 00:45:21 +000029!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64)
30!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "s", scope: !8, file: !3, line: 1, flags: DIFlagFwdDecl)
31!11 = !{i32 2, !"Dwarf Version", i32 2}
32!12 = !{i32 2, !"Debug Info Version", i32 3}
33