1 ; RUN: llc -mtriple=x86_64-linux -O0 -o - -filetype=obj < %s | llvm-dwarfdump -debug-dump=info -| FileCheck %s
2 ; RUN: llc -mtriple=x86_64-linux -dwarf-version=2 -O0 -o - -filetype=obj < %s | llvm-dwarfdump -debug-dump=info -| FileCheck -check-prefix=DWARF2 %s
4 ; Generated from Clang with the following source:
13 ; CHECK: DW_AT_name {{.*}} "c"
15 ; CHECK: DW_AT_data_member_location {{.*}} (0x00)
17 ; CHECK: DW_AT_name {{.*}} "i"
19 ; CHECK: DW_AT_data_member_location {{.*}} (0x04)
21 ; DWARF2: DW_AT_name {{.*}} "c"
23 ; DWARF2: DW_AT_data_member_location {{.*}} (<0x02> 23 00 )
25 ; DWARF2: DW_AT_name {{.*}} "i"
27 ; DWARF2: DW_AT_data_member_location {{.*}} (<0x02> 23 04 )
29 %struct.foo = type { i8, i32 }
31 @f = global %struct.foo zeroinitializer, align 4
34 !llvm.module.flags = !{!13, !15}
37 !0 = !{!"0x11\004\00clang version 3.4 \000\00\000\00\000", !1, !2, !3, !2, !10, !2} ; [ DW_TAG_compile_unit ] [/tmp/dbginfo/data_member_location.cpp] [DW_LANG_C_plus_plus]
38 !1 = !{!"data_member_location.cpp", !"/tmp/dbginfo"}
41 !4 = !{!"0x13\00foo\001\0064\0032\000\000\000", !1, null, null, !5, null, null, !"_ZTS3foo"} ; [ DW_TAG_structure_type ] [foo] [line 1, size 64, align 32, offset 0] [def] [from ]
43 !6 = !{!"0xd\00c\002\008\008\000\000", !1, !"_ZTS3foo", !7} ; [ DW_TAG_member ] [c] [line 2, size 8, align 8, offset 0] [from char]
44 !7 = !{!"0x24\00char\000\008\008\000\000\006", null, null} ; [ DW_TAG_base_type ] [char] [line 0, size 8, align 8, offset 0, enc DW_ATE_signed_char]
45 !8 = !{!"0xd\00i\003\0032\0032\0032\000", !1, !"_ZTS3foo", !9} ; [ DW_TAG_member ] [i] [line 3, size 32, align 32, offset 32] [from int]
46 !9 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
48 !11 = !{!"0x34\00f\00f\00\006\000\001", null, !12, !4, %struct.foo* @f, null} ; [ DW_TAG_variable ] [f] [line 6] [def]
49 !12 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [/tmp/dbginfo/data_member_location.cpp]
50 !13 = !{i32 2, !"Dwarf Version", i32 4}
51 !14 = !{!"clang version 3.4 "}
53 !15 = !{i32 1, !"Debug Info Version", i32 2}