]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/DebugInfo/X86/DW_AT_object_pointer.ll
IR: Make metadata typeless in assembly
[opencl/llvm.git] / test / DebugInfo / X86 / DW_AT_object_pointer.ll
1 ; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
2 ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
4 ; CHECK: DW_TAG_formal_parameter [
5 ; CHECK-NOT: ""
6 ; CHECK: DW_TAG
7 ; CHECK: DW_TAG_class_type
8 ; CHECK: DW_AT_object_pointer [DW_FORM_ref4]     (cu + 0x{{[0-9a-f]*}} => {[[PARAM:0x[0-9a-f]*]]})
9 ; CHECK: [[PARAM]]:     DW_TAG_formal_parameter
10 ; CHECK-NOT: DW_TAG
11 ; CHECK: DW_AT_name [DW_FORM_strp]     ( .debug_str[0x{{[0-9a-f]*}}] = "this")
13 %class.A = type { i32 }
15 define i32 @_Z3fooi(i32) nounwind uwtable ssp {
16 entry:
17   %.addr = alloca i32, align 4
18   %a = alloca %class.A, align 4
19   store i32 %0, i32* %.addr, align 4
20   call void @llvm.dbg.declare(metadata i32* %.addr, metadata !36, metadata !{!"0x102"}), !dbg !35
21   call void @llvm.dbg.declare(metadata %class.A* %a, metadata !21, metadata !{!"0x102"}), !dbg !23
22   call void @_ZN1AC1Ev(%class.A* %a), !dbg !24
23   %m_a = getelementptr inbounds %class.A* %a, i32 0, i32 0, !dbg !25
24   %1 = load i32* %m_a, align 4, !dbg !25
25   ret i32 %1, !dbg !25
26 }
28 declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
30 define linkonce_odr void @_ZN1AC1Ev(%class.A* %this) unnamed_addr nounwind uwtable ssp align 2 {
31 entry:
32   %this.addr = alloca %class.A*, align 8
33   store %class.A* %this, %class.A** %this.addr, align 8
34   call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !26, metadata !{!"0x102"}), !dbg !28
35   %this1 = load %class.A** %this.addr
36   call void @_ZN1AC2Ev(%class.A* %this1), !dbg !29
37   ret void, !dbg !29
38 }
40 define linkonce_odr void @_ZN1AC2Ev(%class.A* %this) unnamed_addr nounwind uwtable ssp align 2 {
41 entry:
42   %this.addr = alloca %class.A*, align 8
43   store %class.A* %this, %class.A** %this.addr, align 8
44   call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !30, metadata !{!"0x102"}), !dbg !31
45   %this1 = load %class.A** %this.addr
46   %m_a = getelementptr inbounds %class.A* %this1, i32 0, i32 0, !dbg !32
47   store i32 0, i32* %m_a, align 4, !dbg !32
48   ret void, !dbg !34
49 }
51 !llvm.dbg.cu = !{!0}
52 !llvm.module.flags = !{!38}
54 !0 = !{!"0x11\004\00clang version 3.2 (trunk 163586) (llvm/trunk 163570)\000\00\000\00\000", !37, !1, !1, !3, !1,  !1} ; [ DW_TAG_compile_unit ] [/Users/echristo/debug-tests/bar.cpp] [DW_LANG_C_plus_plus]
55 !1 = !{}
56 !3 = !{!5, !10, !20}
57 !5 = !{!"0x2e\00foo\00foo\00_Z3fooi\007\000\001\000\006\00256\000\007", !6, !6, !7, null, i32 (i32)* @_Z3fooi, null, null, !1} ; [ DW_TAG_subprogram ] [line 7] [def] [foo]
58 !6 = !{!"0x29", !37} ; [ DW_TAG_file_type ]
59 !7 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !8, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
60 !8 = !{!9}
61 !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]
62 !10 = !{!"0x2e\00A\00A\00_ZN1AC1Ev\003\000\001\000\006\00256\000\003", !6, null, !11, null, void (%class.A*)* @_ZN1AC1Ev, null, !17, !1} ; [ DW_TAG_subprogram ] [line 3] [def] [A]
63 !11 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !12, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
64 !12 = !{null, !13}
65 !13 = !{!"0xf\00\000\0064\0064\000\001088", i32 0, null, !14} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from A]
66 !14 = !{!"0x2\00A\001\0032\0032\000\000\000", !37, null, null, !15, null, null, null} ; [ DW_TAG_class_type ] [A] [line 1, size 32, align 32, offset 0] [def] [from ]
67 !15 = !{!16, !17}
68 !16 = !{!"0xd\00m_a\004\0032\0032\000\000", !37, !14, !9} ; [ DW_TAG_member ] [m_a] [line 4, size 32, align 32, offset 0] [from int]
69 !17 = !{!"0x2e\00A\00A\00\003\000\000\000\006\00256\000\003", !6, !14, !11, null, null, null, i32 0, !18} ; [ DW_TAG_subprogram ] [line 3] [A]
70 !18 = !{!19}
71 !19 = !{!"0x24"}                      ; [ DW_TAG_base_type ] [line 0, size 0, align 0, offset 0]
72 !20 = !{!"0x2e\00A\00A\00_ZN1AC2Ev\003\000\001\000\006\00256\000\003", !6, null, !11, null, void (%class.A*)* @_ZN1AC2Ev, null, !17, !1} ; [ DW_TAG_subprogram ] [line 3] [def] [A]
73 !21 = !{!"0x100\00a\008\000", !22, !6, !14} ; [ DW_TAG_auto_variable ] [a] [line 8]
74 !22 = !{!"0xb\007\0011\000", !6, !5} ; [ DW_TAG_lexical_block ] [/Users/echristo/debug-tests/bar.cpp]
75 !23 = !{i32 8, i32 5, !22, null}
76 !24 = !{i32 8, i32 6, !22, null}
77 !25 = !{i32 9, i32 3, !22, null}
78 !26 = !{!"0x101\00this\0016777219\001088", !10, !6, !27} ; [ DW_TAG_arg_variable ] [this] [line 3]
79 !27 = !{!"0xf\00\000\0064\0064\000\000", null, null, !14} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from A]
80 !28 = !{i32 3, i32 3, !10, null}
81 !29 = !{i32 3, i32 18, !10, null}
82 !30 = !{!"0x101\00this\0016777219\001088", !20, !6, !27} ; [ DW_TAG_arg_variable ] [this] [line 3]
83 !31 = !{i32 3, i32 3, !20, null}
84 !32 = !{i32 3, i32 9, !33, null}
85 !33 = !{!"0xb\003\007\001", !6, !20} ; [ DW_TAG_lexical_block ] [/Users/echristo/debug-tests/bar.cpp]
86 !34 = !{i32 3, i32 18, !33, null}
87 !35 = !{i32 7, i32 0, !5, null}
88 !36 = !{!"0x101\00\0016777223\000", !5, !6, !9} ; [ DW_TAG_arg_variable ] [line 7]
89 !37 = !{!"bar.cpp", !"/Users/echristo/debug-tests"}
90 !38 = !{i32 1, !"Debug Info Version", i32 2}