1 ; RUN: opt -analyze -module-debuginfo < %s | FileCheck %s 2 3 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 15 ; CHECK: Type: Y from /tmp/minimal.c:3 DW_TAG_structure_type 16 ; CHECK: Type: x from /tmp/minimal.c:4 DW_TAG_member 17 ; CHECK: Type: DW_TAG_pointer_type 18 ; CHECK: Type: X from /tmp/minimal.c:1 DW_TAG_structure_type 19 20 21 %struct.Y = type { %struct.X* } 22 %struct.X = type opaque 23 24 @y = common global %struct.Y zeroinitializer, align 8 25 26 !llvm.dbg.cu = !{!0} 27 !llvm.module.flags = !{!10, !11} 28 !llvm.ident = !{!12} 29 30 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (http://llvm.org/git/clang.git 247b30a043eb8f39ea3708e7e995089da0a6b00f) (http://llvm.org/git/llvm.git 6ecc7365a89c771fd229bdd9ffcc178684ea1aa5)", isOptimized: false, runtimeVersion: 0, emissionKind: 1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) 31 !1 = !DIFile(filename: "minimal.c", directory: "/tmp") 32 !2 = !{} 33 !3 = !{!4} 34 !4 = !DIGlobalVariable(name: "y", scope: !0, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, variable: %struct.Y* @y) 35 !5 = !DICompositeType(tag: DW_TAG_structure_type, name: "Y", file: !1, line: 3, size: 64, align: 64, elements: !6) 36 !6 = !{!7} 37 !7 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !5, file: !1, line: 4, baseType: !8, size: 64, align: 64) 38 !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64) 39 !9 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", file: !1, line: 1, flags: DIFlagFwdDecl) 40 !10 = !{i32 2, !"Dwarf Version", i32 4} 41 !11 = !{i32 2, !"Debug Info Version", i32 3} 42 !12 = !{!"clang version 3.7.0 (http://llvm.org/git/clang.git 247b30a043eb8f39ea3708e7e995089da0a6b00f) (http://llvm.org/git/llvm.git 6ecc7365a89c771fd229bdd9ffcc178684ea1aa5)"} 43