brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 163e23d Raw
45 lines · plain
1; RUN: opt -passes='print<module-debuginfo>' -disable-output 2>&1 < %s \2; RUN:   | FileCheck %s3 4; This module is generated from the following c-code:5;6; > union X;7; >8; > struct Y {9; >     union X *x;10; > };11; >12; > struct Y y;13 14; CHECK: Type: Y from /tmp/minimal.c:3 DW_TAG_structure_type15; CHECK: Type: x from /tmp/minimal.c:4 DW_TAG_member16; CHECK: Type: DW_TAG_pointer_type17; CHECK: Type: X from /tmp/minimal.c:1 DW_TAG_structure_type18 19source_filename = "test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll"20 21%struct.Y = type { ptr }22%struct.X = type opaque23 24@y = common global %struct.Y zeroinitializer, align 8, !dbg !025 26!llvm.dbg.cu = !{!2}27!llvm.module.flags = !{!11, !12}28!llvm.ident = !{!13}29 30!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())31!1 = !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 7, type: !6, isLocal: false, isDefinition: true)32!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)33!3 = !DIFile(filename: "minimal.c", directory: "/tmp")34!4 = !{}35!5 = !{!0}36!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "Y", file: !3, line: 3, size: 64, align: 64, elements: !7)37!7 = !{!8}38!8 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !6, file: !3, line: 4, baseType: !9, size: 64, align: 64)39!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64)40!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", file: !3, line: 1, flags: DIFlagFwdDecl)41!11 = !{i32 2, !"Dwarf Version", i32 4}42!12 = !{i32 2, !"Debug Info Version", i32 3}43!13 = !{!"clang version 3.7.0"}44 45