Adrian Prantl | 35e441e | 2015-06-26 21:27:16 +0000 | [diff] [blame] | 1 | ; Generated from tools/clang/test/CodeGen/debug-info-packed-struct.c |
| 2 | ; ModuleID = 'llvm/tools/clang/test/CodeGen/debug-info-packed-struct.c' |
| 3 | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" |
| 4 | target triple = "x86_64-apple-darwin" |
| 5 | |
| 6 | ; RUN: %llc_dwarf -O0 -filetype=obj -o %t.o %s |
| 7 | ; RUN: llvm-dwarfdump -debug-dump=info %t.o | FileCheck %s |
| 8 | ; REQUIRES: object-emission |
| 9 | |
| 10 | %struct.layout0 = type { i8, %struct.size8, i8 } |
| 11 | %struct.size8 = type { i64 } |
| 12 | ; CHECK: DW_TAG_structure_type |
| 13 | ; CHECK: DW_AT_name {{.*}} "layout0" |
| 14 | ; CHECK: DW_AT_byte_size {{.*}} (0x18) |
| 15 | ; CHECK: DW_TAG_member |
| 16 | ; CHECK: DW_AT_name {{.*}} "l0_ofs0" |
| 17 | ; CHECK: DW_AT_data_member_location {{.*}}00 |
| 18 | ; CHECK: DW_TAG_member |
| 19 | ; CHECK: DW_AT_name {{.*}} "l0_ofs8" |
| 20 | ; CHECK: DW_AT_data_member_location {{.*}}08 |
| 21 | ; CHECK: DW_TAG_member |
| 22 | ; CHECK: DW_AT_name {{.*}} "l0_ofs16" |
| 23 | ; CHECK: DW_AT_bit_size {{.*}} (0x01) |
| 24 | ; CHECK: DW_AT_bit_offset {{.*}} (0x1f) |
| 25 | ; CHECK: DW_AT_data_member_location {{.*}}10 |
| 26 | |
| 27 | %struct.layout1 = type <{ i8, %struct.size8_anon, i8, [2 x i8] }> |
| 28 | %struct.size8_anon = type { i64 } |
| 29 | |
| 30 | ; CHECK: DW_TAG_structure_type |
| 31 | ; CHECK: DW_AT_name {{.*}} "layout1" |
| 32 | ; CHECK: DW_AT_byte_size {{.*}} (0x0c) |
| 33 | ; CHECK: DW_TAG_member |
| 34 | ; CHECK: DW_AT_name {{.*}} "l1_ofs0" |
| 35 | ; CHECK: DW_AT_data_member_location {{.*}}00 |
| 36 | ; CHECK: DW_TAG_member |
| 37 | ; CHECK: DW_AT_name {{.*}} "l1_ofs1" |
| 38 | ; CHECK: DW_AT_data_member_location {{.*}}01 |
| 39 | ; CHECK: DW_TAG_member |
| 40 | ; CHECK: DW_AT_name {{.*}} "l1_ofs9" |
| 41 | ; CHECK: DW_AT_byte_size {{.*}} (0x04) |
| 42 | ; CHECK: DW_AT_bit_size {{.*}} (0x01) |
| 43 | ; CHECK: DW_AT_bit_offset {{.*}} (0x17) |
| 44 | ; CHECK: DW_AT_data_member_location {{.*}}08 |
| 45 | |
| 46 | %struct.layout2 = type <{ i8, %struct.size8_pack1, i8 }> |
| 47 | %struct.size8_pack1 = type { i64 } |
| 48 | |
| 49 | ; CHECK: DW_TAG_structure_type |
| 50 | ; CHECK: DW_AT_name {{.*}} "layout2" |
| 51 | ; CHECK: DW_AT_byte_size {{.*}} (0x0a) |
| 52 | ; CHECK: DW_TAG_member |
| 53 | ; CHECK: DW_AT_name {{.*}} "l2_ofs0" |
| 54 | ; CHECK: DW_AT_data_member_location {{.*}}00 |
| 55 | ; CHECK: DW_TAG_member |
| 56 | ; CHECK: DW_AT_name {{.*}} "l2_ofs1" |
| 57 | ; CHECK: DW_AT_data_member_location {{.*}}01 |
| 58 | ; CHECK: DW_TAG_member |
| 59 | ; CHECK: DW_AT_name {{.*}} "l2_ofs9" |
| 60 | ; CHECK: DW_AT_byte_size {{.*}} (0x04) |
| 61 | ; CHECK: DW_AT_bit_size {{.*}} (0x01) |
| 62 | ; CHECK: DW_AT_bit_offset {{.*}} (0x17) |
| 63 | ; CHECK: DW_AT_data_member_location {{.*}}08 |
| 64 | |
| 65 | %struct.layout3 = type <{ i8, [3 x i8], %struct.size8_pack4, i8, [3 x i8] }> |
| 66 | %struct.size8_pack4 = type { i64 } |
| 67 | |
| 68 | ; CHECK: DW_TAG_structure_type |
| 69 | ; CHECK: DW_AT_name {{.*}} "layout3" |
| 70 | ; CHECK: DW_AT_byte_size {{.*}} (0x10) |
| 71 | ; CHECK: DW_TAG_member |
| 72 | ; CHECK: DW_AT_name {{.*}} "l3_ofs0" |
| 73 | ; CHECK: DW_AT_data_member_location {{.*}}00 |
| 74 | ; CHECK: DW_TAG_member |
| 75 | ; CHECK: DW_AT_name {{.*}} "l3_ofs4" |
| 76 | ; CHECK: DW_AT_data_member_location {{.*}}04 |
| 77 | ; CHECK: DW_TAG_member |
| 78 | ; CHECK: DW_AT_name {{.*}} "l3_ofs12" |
| 79 | ; CHECK: DW_AT_byte_size {{.*}} (0x04) |
| 80 | ; CHECK: DW_AT_bit_size {{.*}} (0x01) |
| 81 | ; CHECK: DW_AT_bit_offset {{.*}} (0x1f) |
| 82 | ; CHECK: DW_AT_data_member_location {{.*}}0c |
| 83 | |
| 84 | @l0 = common global %struct.layout0 zeroinitializer, align 8 |
| 85 | @l1 = common global %struct.layout1 zeroinitializer, align 4 |
| 86 | @l2 = common global %struct.layout2 zeroinitializer, align 1 |
| 87 | @l3 = common global %struct.layout3 zeroinitializer, align 4 |
| 88 | |
| 89 | !llvm.dbg.cu = !{!0} |
| 90 | !llvm.module.flags = !{!45, !46} |
| 91 | !llvm.ident = !{!47} |
| 92 | |
| 93 | !0 = !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240791) (llvm/trunk 240790)", isOptimized: false, runtimeVersion: 0, emissionKind: 1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) |
| 94 | !1 = !DIFile(filename: "/llvm/tools/clang/test/CodeGen/<stdin>", directory: "/llvm/_build.ninja.release") |
| 95 | !2 = !{} |
| 96 | !3 = !{!4, !18, !25, !35} |
| 97 | !4 = !DIGlobalVariable(name: "l0", scope: !0, file: !5, line: 88, type: !6, isLocal: false, isDefinition: true, variable: %struct.layout0* @l0) |
| 98 | !5 = !DIFile(filename: "/llvm/tools/clang/test/CodeGen/debug-info-packed-struct.c", directory: "/llvm/_build.ninja.release") |
| 99 | !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout0", file: !5, line: 15, size: 192, align: 64, elements: !7) |
| 100 | !7 = !{!8, !10, !17} |
| 101 | !8 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs0", scope: !6, file: !5, line: 16, baseType: !9, size: 8, align: 8) |
| 102 | !9 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) |
| 103 | !10 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs8", scope: !6, file: !5, line: 17, baseType: !11, size: 64, align: 64, offset: 64) |
| 104 | !11 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8", file: !5, line: 11, size: 64, align: 64, elements: !12) |
| 105 | !12 = !{!13, !15} |
| 106 | !13 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !11, file: !5, line: 12, baseType: !14, size: 4, align: 32) |
| 107 | !14 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 108 | !15 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !11, file: !5, line: 13, baseType: !16, size: 60, offset: 4) |
| 109 | !16 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) |
| 110 | !17 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs16", scope: !6, file: !5, line: 18, baseType: !14, size: 1, align: 32, offset: 128) |
| 111 | !18 = !DIGlobalVariable(name: "l1", scope: !0, file: !5, line: 89, type: !19, isLocal: false, isDefinition: true, variable: %struct.layout1* @l1) |
| 112 | !19 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout1", file: !5, line: 34, size: 96, align: 32, elements: !20) |
| 113 | !20 = !{!21, !22, !24} |
| 114 | !21 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs0", scope: !19, file: !5, line: 35, baseType: !9, size: 8, align: 8) |
| 115 | !22 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs1", scope: !19, file: !5, line: 36, baseType: !23, size: 64, align: 8, offset: 8) |
| 116 | !23 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_anon", file: !5, line: 30, size: 64, align: 8, elements: !2) |
| 117 | !24 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs9", scope: !19, file: !5, line: 37, baseType: !14, size: 1, align: 32, offset: 72) |
| 118 | !25 = !DIGlobalVariable(name: "l2", scope: !0, file: !5, line: 90, type: !26, isLocal: false, isDefinition: true, variable: %struct.layout2* @l2) |
| 119 | !26 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout2", file: !5, line: 54, size: 80, align: 8, elements: !27) |
| 120 | !27 = !{!28, !29, !34} |
| 121 | !28 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs0", scope: !26, file: !5, line: 55, baseType: !9, size: 8, align: 8) |
| 122 | !29 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs1", scope: !26, file: !5, line: 56, baseType: !30, size: 64, align: 8, offset: 8) |
| 123 | !30 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_pack1", file: !5, line: 50, size: 64, align: 8, elements: !31) |
| 124 | !31 = !{!32, !33} |
| 125 | !32 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !30, file: !5, line: 51, baseType: !14, size: 4, align: 32) |
| 126 | !33 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !30, file: !5, line: 52, baseType: !16, size: 60, offset: 4) |
| 127 | !34 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs9", scope: !26, file: !5, line: 57, baseType: !14, size: 1, align: 32, offset: 72) |
| 128 | !35 = !DIGlobalVariable(name: "l3", scope: !0, file: !5, line: 91, type: !36, isLocal: false, isDefinition: true, variable: %struct.layout3* @l3) |
| 129 | !36 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout3", file: !5, line: 76, size: 128, align: 32, elements: !37) |
| 130 | !37 = !{!38, !39, !44} |
| 131 | !38 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs0", scope: !36, file: !5, line: 77, baseType: !9, size: 8, align: 8) |
| 132 | !39 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs4", scope: !36, file: !5, line: 78, baseType: !40, size: 64, align: 32, offset: 32) |
| 133 | !40 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_pack4", file: !5, line: 72, size: 64, align: 32, elements: !41) |
| 134 | !41 = !{!42, !43} |
| 135 | !42 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !40, file: !5, line: 73, baseType: !14, size: 4, align: 32) |
| 136 | !43 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !40, file: !5, line: 74, baseType: !16, size: 60, offset: 4) |
| 137 | !44 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs12", scope: !36, file: !5, line: 79, baseType: !14, size: 1, align: 32, offset: 96) |
| 138 | !45 = !{i32 2, !"Dwarf Version", i32 2} |
| 139 | !46 = !{i32 2, !"Debug Info Version", i32 3} |
| 140 | !47 = !{!"clang version 3.7.0 (trunk 240791) (llvm/trunk 240790)"} |