bbd93c941320ebbeb326192e924feba3c2c0dd1a
[oota-llvm.git] / test / DebugInfo / ARM / cfi-eof-prologue.ll
1 ; struct A {
2 ;   A();
3 ;   virtual ~A();
4 ; };
5 ; struct B : A {
6 ;   B();
7 ;   virtual ~B();
8 ; };
9 ; B::B() {}
10 ; CHECK: __ZN1BC1Ev:
11 ; CHECK:     .loc       1 [[@LINE-2]] 0 prologue_end
12 ; CHECK-NOT: .loc       1 0 0 prologue_end
13
14 ; The location of the prologue_end marker should not be affected by the presence
15 ; of CFI instructions.
16
17 ; RUN: llc -O0 -filetype=asm -mtriple=thumbv7-apple-ios < %s | FileCheck %s
18 ; RUN: llc -O0 -filetype=asm -mtriple=thumbv6-apple-ios < %s | FileCheck %s
19
20 ; ModuleID = 'test1.cpp'
21 target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
22 target triple = "thumbv7-apple-ios"
23
24 %struct.B = type { %struct.A }
25 %struct.A = type { i32 (...)** }
26
27 @_ZTV1B = external unnamed_addr constant [4 x i8*]
28
29 ; Function Attrs: nounwind
30 define %struct.B* @_ZN1BC2Ev(%struct.B* %this) unnamed_addr #0 align 2 {
31 entry:
32   tail call void @llvm.dbg.value(metadata %struct.B* %this, i64 0, metadata !30, metadata !40), !dbg !41
33   %0 = getelementptr inbounds %struct.B* %this, i32 0, i32 0, !dbg !42
34   %call = tail call %struct.A* @_ZN1AC2Ev(%struct.A* %0) #3, !dbg !42
35   %1 = getelementptr inbounds %struct.B* %this, i32 0, i32 0, i32 0, !dbg !42
36   store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*]* @_ZTV1B, i32 0, i32 2) to i32 (...)**), i32 (...)*** %1, align 4, !dbg !42, !tbaa !43
37   ret %struct.B* %this, !dbg !42
38 }
39
40 declare %struct.A* @_ZN1AC2Ev(%struct.A*)
41
42 ; Function Attrs: nounwind
43 define %struct.B* @_ZN1BC1Ev(%struct.B* %this) unnamed_addr #0 align 2 {
44 entry:
45   tail call void @llvm.dbg.value(metadata %struct.B* %this, i64 0, metadata !34, metadata !40), !dbg !46
46   tail call void @llvm.dbg.value(metadata %struct.B* %this, i64 0, metadata !47, metadata !40) #3, !dbg !49
47   %0 = getelementptr inbounds %struct.B* %this, i32 0, i32 0, !dbg !50
48   %call.i = tail call %struct.A* @_ZN1AC2Ev(%struct.A* %0) #3, !dbg !50
49   %1 = getelementptr inbounds %struct.B* %this, i32 0, i32 0, i32 0, !dbg !50
50   store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*]* @_ZTV1B, i32 0, i32 2) to i32 (...)**), i32 (...)*** %1, align 4, !dbg !50, !tbaa !43
51   ret %struct.B* %this, !dbg !48
52 }
53
54 ; Function Attrs: nounwind readnone
55 declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2
56
57 attributes #0 = { nounwind }
58 attributes #2 = { nounwind readnone }
59 attributes #3 = { nounwind }
60
61 !llvm.dbg.cu = !{!0}
62 !llvm.module.flags = !{!35, !36, !37, !38}
63 !llvm.ident = !{!39}
64
65 !0 = !{!"0x11\004\00clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)\001\00\000\00\001", !1, !2, !3, !27, !2, !2} ; [ DW_TAG_compile_unit ] [<stdin>] [DW_LANG_C_plus_plus]
66 !1 = !{!"<stdin>", !""}
67 !2 = !{}
68 !3 = !{!4, !13}
69 !4 = !{!"0x13\00B\005\0032\0032\000\000\000", !5, null, null, !6, !"_ZTS1A", null, !"_ZTS1B"} ; [ DW_TAG_structure_type ] [B] [line 5, size 32, align 32, offset 0] [def] [from ]
70 !5 = !{!"test1.cpp", !""}
71 !6 = !{!7, !8, !12}
72 !7 = !{!"0x1c\00\000\000\000\000\000", null, !"_ZTS1B", !"_ZTS1A"} ; [ DW_TAG_inheritance ] [line 0, size 0, align 0, offset 0] [from _ZTS1A]
73 !8 = !{!"0x2e\00B\00B\00\006\000\000\000\000\00256\001\006", !5, !"_ZTS1B", !9, null, null, null, null, null} ; [ DW_TAG_subprogram ] [line 6] [B]
74 !9 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !10, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
75 !10 = !{null, !11}
76 !11 = !{!"0xf\00\000\0032\0032\000\001088\00", null, null, !"_ZTS1B"} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [artificial] [from _ZTS1B]
77 !12 = !{!"0x2e\00~B\00~B\00\007\000\000\001\000\00256\001\007", !5, !"_ZTS1B", !9, !"_ZTS1B", null, null, null, null} ; [ DW_TAG_subprogram ] [line 7] [~B]
78 !13 = !{!"0x13\00A\001\0032\0032\000\000\000", !5, null, null, !14, !"_ZTS1A", null, !"_ZTS1A"} ; [ DW_TAG_structure_type ] [A] [line 1, size 32, align 32, offset 0] [def] [from ]
79 !14 = !{!15, !22, !26}
80 !15 = !{!"0xd\00_vptr$A\000\0032\000\000\0064", !5, !16, !17} ; [ DW_TAG_member ] [_vptr$A] [line 0, size 32, align 0, offset 0] [artificial] [from ]
81 !16 = !{!"0x29", !5}                              ; [ DW_TAG_file_type ] [test1.cpp]
82 !17 = !{!"0xf\00\000\0032\000\000\000", null, null, !18} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 0, offset 0] [from __vtbl_ptr_type]
83 !18 = !{!"0xf\00__vtbl_ptr_type\000\0032\000\000\000", null, null, !19} ; [ DW_TAG_pointer_type ] [__vtbl_ptr_type] [line 0, size 32, align 0, offset 0] [from ]
84 !19 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !20, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
85 !20 = !{!21}
86 !21 = !{!"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]
87 !22 = !{!"0x2e\00A\00A\00\002\000\000\000\000\00256\001\002", !5, !"_ZTS1A", !23, null, null, null, null, null} ; [ DW_TAG_subprogram ] [line 2] [A]
88 !23 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !24, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
89 !24 = !{null, !25}
90 !25 = !{!"0xf\00\000\0032\0032\000\001088\00", null, null, !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [artificial] [from _ZTS1A]
91 !26 = !{!"0x2e\00~A\00~A\00\003\000\000\001\000\00256\001\003", !5, !"_ZTS1A", !23, !"_ZTS1A", null, null, null, null} ; [ DW_TAG_subprogram ] [line 3] [~A]
92 !27 = !{!28, !32}
93 !28 = !{!"0x2e\00B\00B\00_ZN1BC2Ev\009\000\001\000\000\00256\001\009", !5, !"_ZTS1B", !9, null, %struct.B* (%struct.B*)* @_ZN1BC2Ev, null, !8, !29} ; [ DW_TAG_subprogram ] [line 9] [def] [B]
94 !29 = !{!30}
95 !30 = !{!"0x101\00this\0016777216\001088", !28, null, !31} ; [ DW_TAG_arg_variable ] [this] [line 0]
96 !31 = !{!"0xf\00\000\0032\0032\000\000", null, null, !"_ZTS1B"} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from _ZTS1B]
97 !32 = !{!"0x2e\00B\00B\00_ZN1BC1Ev\009\000\001\000\000\00256\001\009", !5, !"_ZTS1B", !9, null, %struct.B* (%struct.B*)* @_ZN1BC1Ev, null, !8, !33} ; [ DW_TAG_subprogram ] [line 9] [def] [B]
98 !33 = !{!34}
99 !34 = !{!"0x101\00this\0016777216\001088", !32, null, !31} ; [ DW_TAG_arg_variable ] [this] [line 0]
100 !35 = !{i32 2, !"Dwarf Version", i32 4}
101 !36 = !{i32 2, !"Debug Info Version", i32 2}
102 !37 = !{i32 1, !"wchar_size", i32 4}
103 !38 = !{i32 1, !"min_enum_size", i32 4}
104 !39 = !{!"clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)"}
105 !40 = !{!"0x102"}                                 ; [ DW_TAG_expression ]
106 !41 = !{i32 0, i32 0, !28, null}
107 !42 = !{i32 9, i32 0, !28, null}
108 !43 = !{!44, !44, i64 0}
109 !44 = !{!"vtable pointer", !45, i64 0}
110 !45 = !{!"Simple C/C++ TBAA"}
111 !46 = !{i32 0, i32 0, !32, null}
112 !47 = !{!"0x101\00this\0016777216\001088", !28, null, !31, !48} ; [ DW_TAG_arg_variable ] [this] [line 0]
113 !48 = !{i32 9, i32 0, !32, null}
114 !49 = !{i32 0, i32 0, !28, !48}
115 !50 = !{i32 9, i32 0, !28, !48}