Adrian Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 1 | source_filename = "test/DebugInfo/X86/DIModuleContext.ll" |
Adrian Prantl | d209500 | 2015-09-10 17:13:58 +0000 | [diff] [blame] | 2 | target triple = "x86_64-apple-macosx" |
David Blaikie | 01cee92 | 2020-11-24 17:45:47 -0800 | [diff] [blame] | 3 | ; RUN: llc %s -o - -filetype=obj \ |
Adrian Prantl | 7bc1b28 | 2017-09-11 22:59:45 +0000 | [diff] [blame] | 4 | ; RUN: | llvm-dwarfdump -debug-info - | FileCheck %s |
Adrian Prantl | d209500 | 2015-09-10 17:13:58 +0000 | [diff] [blame] | 5 | ; 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 Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 15 | @i = common global %struct.s* null, align 8, !dbg !0 |
Adrian Prantl | d209500 | 2015-09-10 17:13:58 +0000 | [diff] [blame] | 16 | |
Adrian Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 17 | !llvm.dbg.cu = !{!2} |
| 18 | !llvm.module.flags = !{!11, !12} |
Adrian Prantl | d209500 | 2015-09-10 17:13:58 +0000 | [diff] [blame] | 19 | |
Adrian Prantl | 0578221 | 2017-08-30 18:06:51 +0000 | [diff] [blame] | 20 | !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) |
Adrian Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 21 | !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 Prantl | d63bfd2 | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 27 | !7 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !8, file: !3, line: 11) |
Adrian Prantl | 7b30370 | 2020-01-14 13:37:04 -0800 | [diff] [blame] | 28 | !8 = !DIModule(scope: null, name: "Module", includePath: ".") |
Adrian Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 29 | !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 | |