blob: 54bb0a548b76579a55da66459d6cd773fff4eb10 [file] [log] [blame]
Jyotsna Verma9dea0952013-04-10 19:53:26 +00001; REQUIRES: object-emission
Eric Christopherb2a602d2013-04-27 01:07:22 +00002; XFAIL: hexagon
Jyotsna Verma9dea0952013-04-10 19:53:26 +00003
Timur Iskhodzhanovf166f6c2014-01-30 01:39:17 +00004; RUN: %llc_dwarf -filetype=obj -O0 < %s > %t
Eli Benderskye6abe832013-01-25 21:44:53 +00005; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
David Blaikie5d3249b2013-01-07 05:51:15 +00006; CHECK: DW_TAG_ptr_to_member_type
Manman Renf4c339e2013-10-29 22:49:29 +00007; CHECK: DW_TAG_ptr_to_member_type
8; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE:0x[0-9a-f]+]]})
9; CHECK: [[TYPE]]: DW_TAG_subroutine_type
David Blaikie9a7a7a92013-01-29 19:35:24 +000010; CHECK: DW_TAG_formal_parameter
11; CHECK-NEXT: DW_AT_type
Eric Christopher203e12b2013-04-27 01:07:52 +000012; CHECK-NEXT: DW_AT_artificial [DW_FORM_flag
David Blaikie5d3249b2013-01-07 05:51:15 +000013; IR generated from clang -g with the following source:
14; struct S {
15; };
16;
17; int S::*x = 0;
18; void (S::*y)(int) = 0;
19
David Blaikie5d3249b2013-01-07 05:51:15 +000020@x = global i64 -1, align 8
21@y = global { i64, i64 } zeroinitializer, align 8
22
23!llvm.dbg.cu = !{!0}
Manman Ren409558f2013-11-22 21:49:45 +000024!llvm.module.flags = !{!16}
David Blaikie5d3249b2013-01-07 05:51:15 +000025
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000026!0 = !{!"0x11\004\00clang version 3.3 \000\00\000\00\000", !15, !1, !1, !1, !3, !1} ; [ DW_TAG_compile_unit ] [/home/blaikie/Development/scratch/simple.cpp] [DW_LANG_C_plus_plus]
27!1 = !{}
28!3 = !{!5, !10}
29!5 = !{!"0x34\00x\00x\00\004\000\001", null, !6, !7, i64* @x, null} ; [ DW_TAG_variable ] [x] [line 4] [def]
30!6 = !{!"0x29", !15} ; [ DW_TAG_file_type ]
31!7 = !{!"0x1f\00\000\000\000\000\000", null, null, !8, !9} ; [ DW_TAG_ptr_to_member_type ] [line 0, size 0, align 0, offset 0] [from int]
32!8 = !{!"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]
33!9 = !{!"0x13\00S\001\008\008\000\000\000", !15, null, null, !1, null, null, null} ; [ DW_TAG_structure_type ] [S] [line 1, size 8, align 8, offset 0] [def] [from ]
34!10 = !{!"0x34\00y\00y\00\005\000\001", null, !6, !11, { i64, i64 }* @y, null} ; [ DW_TAG_variable ] [y] [line 5] [def]
35!11 = !{!"0x1f\00\000\000\000\000\000", null, null, !12, !9} ; [ DW_TAG_ptr_to_member_type ] [line 0, size 0, align 0, offset 0] [from ]
36!12 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !13, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
37!13 = !{null, !14, !8}
38!14 = !{!"0xf\00\000\0064\0064\000\001088", i32 0, null, !9} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from S]
39!15 = !{!"simple.cpp", !"/home/blaikie/Development/scratch"}
40!16 = !{i32 1, !"Debug Info Version", i32 2}