blob: 9e63c64ba263b5bf21dd88d43f16fec8efe93f8f [file] [log] [blame]
Adrian Prantld3da8ca2015-06-26 23:31:27 +00001; RUN: %llc_dwarf -O0 -filetype=obj -o %t.o %s
2; RUN: llvm-dwarfdump -debug-dump=info %t.o | FileCheck %s
3; REQUIRES: object-emission
4;
5; Generated from:
6; struct {
7; char c;
8; int : 4;
9; int reserved : 28;
10; } a;
11;
12; CHECK: DW_TAG_member
13; CHECK: DW_AT_name {{.*}} "reserved"
14; CHECK: DW_AT_byte_size {{.*}} (0x04)
15; CHECK: DW_AT_bit_size {{.*}} (0x1c)
Adrian Prantle5447572016-04-28 15:37:52 +000016; CHECK: DW_AT_bit_offset {{.*}} (0xfffffffffffffff8)
Adrian Prantlcb53eed2015-06-27 21:55:00 +000017; CHECK: DW_AT_data_member_location {{.*}}00
Adrian Prantld3da8ca2015-06-26 23:31:27 +000018target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
19target triple = "thumbv7-apple-ios"
20
21%struct.anon = type { i8, [5 x i8] }
22
Peter Collingbourned4135bb2016-09-13 01:12:59 +000023@a = common global %struct.anon zeroinitializer, align 1, !dbg !4
Adrian Prantld3da8ca2015-06-26 23:31:27 +000024
25!llvm.dbg.cu = !{!0}
26!llvm.module.flags = !{!11, !12, !13, !14, !15}
27!llvm.ident = !{!16}
28
Adrian Prantl75819ae2016-04-15 15:57:41 +000029!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2)
Adrian Prantld3da8ca2015-06-26 23:31:27 +000030!1 = !DIFile(filename: "test.i", directory: "/")
31!2 = !{}
32!3 = !{!4}
Adrian Prantlbceaaa92016-12-20 02:09:43 +000033!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true))
Adrian Prantld3da8ca2015-06-26 23:31:27 +000034!5 = !DICompositeType(tag: DW_TAG_structure_type, file: !1, line: 1, size: 48, align: 8, elements: !6)
35!6 = !{!7, !9}
36!7 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !5, file: !1, line: 2, baseType: !8, size: 8, align: 8)
37!8 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
38!9 = !DIDerivedType(tag: DW_TAG_member, name: "reserved", scope: !5, file: !1, line: 4, baseType: !10, size: 28, align: 32, offset: 12)
39!10 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
40!11 = !{i32 2, !"Dwarf Version", i32 2}
41!12 = !{i32 2, !"Debug Info Version", i32 3}
42!13 = !{i32 1, !"wchar_size", i32 4}
43!14 = !{i32 1, !"min_enum_size", i32 4}
44!15 = !{i32 1, !"PIC Level", i32 2}
45!16 = !{!"clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)"}