1*0a6a1f1dSLionel Sambuc; REQUIRES: object-emission 2*0a6a1f1dSLionel Sambuc; Test (r)value qualifiers on C++11 non-static member functions. 3*0a6a1f1dSLionel Sambuc; Generated from tools/clang/test/CodeGenCXX/debug-info-qualifiers.cpp 4*0a6a1f1dSLionel Sambuc; 5*0a6a1f1dSLionel Sambuc; class A { 6*0a6a1f1dSLionel Sambuc; public: 7*0a6a1f1dSLionel Sambuc; void l() const &; 8*0a6a1f1dSLionel Sambuc; void r() const &&; 9*0a6a1f1dSLionel Sambuc; }; 10*0a6a1f1dSLionel Sambuc; 11*0a6a1f1dSLionel Sambuc; void g() { 12*0a6a1f1dSLionel Sambuc; A a; 13*0a6a1f1dSLionel Sambuc; auto pl = &A::l; 14*0a6a1f1dSLionel Sambuc; auto pr = &A::r; 15*0a6a1f1dSLionel Sambuc; } 16*0a6a1f1dSLionel Sambuc; 17*0a6a1f1dSLionel Sambuc; RUN: %llc_dwarf -filetype=obj -O0 < %s | llvm-dwarfdump - | FileCheck %s 18*0a6a1f1dSLionel Sambuc; CHECK: DW_TAG_subroutine_type DW_CHILDREN_yes 19*0a6a1f1dSLionel Sambuc; CHECK-NEXT: DW_AT_reference DW_FORM_flag_present 20*0a6a1f1dSLionel Sambuc; CHECK: DW_TAG_subroutine_type DW_CHILDREN_yes 21*0a6a1f1dSLionel Sambuc; CHECK-NEXT: DW_AT_rvalue_reference DW_FORM_flag_present 22*0a6a1f1dSLionel Sambuc; 23*0a6a1f1dSLionel Sambuc; CHECK: DW_TAG_subprogram 24*0a6a1f1dSLionel Sambuc; CHECK-NOT: DW_TAG_subprogram 25*0a6a1f1dSLionel Sambuc; CHECK: DW_AT_name {{.*}}"l" 26*0a6a1f1dSLionel Sambuc; CHECK-NOT: DW_TAG_subprogram 27*0a6a1f1dSLionel Sambuc; CHECK: DW_AT_reference [DW_FORM_flag_present] (true) 28*0a6a1f1dSLionel Sambuc 29*0a6a1f1dSLionel Sambuc; CHECK: DW_TAG_subprogram 30*0a6a1f1dSLionel Sambuc; CHECK-NOT: DW_TAG_subprogram 31*0a6a1f1dSLionel Sambuc; CHECK: DW_AT_name {{.*}}"r" 32*0a6a1f1dSLionel Sambuc; CHECK-NOT: DW_TAG_subprogram 33*0a6a1f1dSLionel Sambuc; CHECK: DW_AT_rvalue_reference [DW_FORM_flag_present] (true) 34*0a6a1f1dSLionel Sambuc 35*0a6a1f1dSLionel Sambuc%class.A = type { i8 } 36*0a6a1f1dSLionel Sambuc 37*0a6a1f1dSLionel Sambuc; Function Attrs: nounwind 38*0a6a1f1dSLionel Sambucdefine void @_Z1gv() #0 { 39*0a6a1f1dSLionel Sambuc %a = alloca %class.A, align 1 40*0a6a1f1dSLionel Sambuc %pl = alloca { i64, i64 }, align 8 41*0a6a1f1dSLionel Sambuc %pr = alloca { i64, i64 }, align 8 42*0a6a1f1dSLionel Sambuc call void @llvm.dbg.declare(metadata %class.A* %a, metadata !24, metadata !{!"0x102"}), !dbg !25 43*0a6a1f1dSLionel Sambuc call void @llvm.dbg.declare(metadata { i64, i64 }* %pl, metadata !26, metadata !{!"0x102"}), !dbg !31 44*0a6a1f1dSLionel Sambuc store { i64, i64 } { i64 ptrtoint (void (%class.A*)* @_ZNKR1A1lEv to i64), i64 0 }, { i64, i64 }* %pl, align 8, !dbg !31 45*0a6a1f1dSLionel Sambuc call void @llvm.dbg.declare(metadata { i64, i64 }* %pr, metadata !32, metadata !{!"0x102"}), !dbg !35 46*0a6a1f1dSLionel Sambuc store { i64, i64 } { i64 ptrtoint (void (%class.A*)* @_ZNKO1A1rEv to i64), i64 0 }, { i64, i64 }* %pr, align 8, !dbg !35 47*0a6a1f1dSLionel Sambuc ret void, !dbg !36 48*0a6a1f1dSLionel Sambuc} 49*0a6a1f1dSLionel Sambuc 50*0a6a1f1dSLionel Sambuc; Function Attrs: nounwind readnone 51*0a6a1f1dSLionel Sambucdeclare void @llvm.dbg.declare(metadata, metadata, metadata) #1 52*0a6a1f1dSLionel Sambuc 53*0a6a1f1dSLionel Sambucdeclare void @_ZNKR1A1lEv(%class.A*) 54*0a6a1f1dSLionel Sambuc 55*0a6a1f1dSLionel Sambucdeclare void @_ZNKO1A1rEv(%class.A*) 56*0a6a1f1dSLionel Sambuc 57*0a6a1f1dSLionel Sambucattributes #0 = { nounwind } 58*0a6a1f1dSLionel Sambucattributes #1 = { nounwind readnone } 59*0a6a1f1dSLionel Sambuc 60*0a6a1f1dSLionel Sambuc!llvm.dbg.cu = !{!0} 61*0a6a1f1dSLionel Sambuc!llvm.module.flags = !{!21, !22} 62*0a6a1f1dSLionel Sambuc!llvm.ident = !{!23} 63*0a6a1f1dSLionel Sambuc 64*0a6a1f1dSLionel Sambuc!0 = !{!"0x11\004\00clang version 3.5 \000\00\000\00\000", !1, !2, !3, !16, !2, !2} ; [ DW_TAG_compile_unit ] [] [DW_LANG_C_plus_plus] 65*0a6a1f1dSLionel Sambuc!1 = !{!"", !""} 66*0a6a1f1dSLionel Sambuc!2 = !{} 67*0a6a1f1dSLionel Sambuc!3 = !{!4} 68*0a6a1f1dSLionel Sambuc!4 = !{!"0x2\00A\002\008\008\000\000\000", !5, null, null, !6, null, null, !"_ZTS1A"} ; [ DW_TAG_class_type ] [A] [line 2, size 8, align 8, offset 0] [def] [from ] 69*0a6a1f1dSLionel Sambuc!5 = !{!"debug-info-qualifiers.cpp", !""} 70*0a6a1f1dSLionel Sambuc!6 = !{!7, !13} 71*0a6a1f1dSLionel Sambuc!7 = !{!"0x2e\00l\00l\00_ZNKR1A1lEv\005\000\000\000\006\0016640\000\005", !5, !"_ZTS1A", !8, null, null, null, i32 0, !12} ; [ DW_TAG_subprogram ] [line 5] [reference] [l] 72*0a6a1f1dSLionel Sambuc!8 = !{!"0x15\00\000\000\000\000\0016384\000", i32 0, null, null, !9, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [reference] [from ] 73*0a6a1f1dSLionel Sambuc!9 = !{null, !10} 74*0a6a1f1dSLionel Sambuc!10 = !{!"0xf\00\000\0064\0064\000\001088", null, null, !11} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from ] 75*0a6a1f1dSLionel Sambuc!11 = !{!"0x26\00\000\000\000\000\000", null, null, !"_ZTS1A"} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from _ZTS1A] 76*0a6a1f1dSLionel Sambuc!12 = !{i32 786468} 77*0a6a1f1dSLionel Sambuc!13 = !{!"0x2e\00r\00r\00_ZNKO1A1rEv\007\000\000\000\006\0033024\000\007", !5, !"_ZTS1A", !14, null, null, null, i32 0, !15} ; [ DW_TAG_subprogram ] [line 7] [rvalue reference] [r] 78*0a6a1f1dSLionel Sambuc!14 = !{!"0x15\00\000\000\000\000\0032768\000", i32 0, null, null, !9, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [rvalue reference] [from ] 79*0a6a1f1dSLionel Sambuc!15 = !{i32 786468} 80*0a6a1f1dSLionel Sambuc!16 = !{!17} 81*0a6a1f1dSLionel Sambuc!17 = !{!"0x2e\00g\00g\00_Z1gv\0010\000\001\000\006\00256\000\0010", !5, !18, !19, null, void ()* @_Z1gv, null, null, !2} ; [ DW_TAG_subprogram ] [line 10] [def] [g] 82*0a6a1f1dSLionel Sambuc!18 = !{!"0x29", !5} ; [ DW_TAG_file_type ] 83*0a6a1f1dSLionel Sambuc!19 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !20, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] 84*0a6a1f1dSLionel Sambuc!20 = !{null} 85*0a6a1f1dSLionel Sambuc!21 = !{i32 2, !"Dwarf Version", i32 4} 86*0a6a1f1dSLionel Sambuc!22 = !{i32 1, !"Debug Info Version", i32 2} 87*0a6a1f1dSLionel Sambuc!23 = !{!"clang version 3.5 "} 88*0a6a1f1dSLionel Sambuc!24 = !{!"0x100\00a\0011\000", !17, !18, !4} ; [ DW_TAG_auto_variable ] [a] [line 11] 89*0a6a1f1dSLionel Sambuc!25 = !MDLocation(line: 11, scope: !17) 90*0a6a1f1dSLionel Sambuc!26 = !{!"0x100\00pl\0016\000", !17, !18, !27} ; [ DW_TAG_auto_variable ] [pl] [line 16] 91*0a6a1f1dSLionel Sambuc!27 = !{!"0x1f\00\000\000\000\000\000", null, null, !28, !"_ZTS1A"} ; [ DW_TAG_ptr_to_member_type ] [line 0, size 0, align 0, offset 0] [from ] 92*0a6a1f1dSLionel Sambuc!28 = !{!"0x15\00\000\000\000\000\0016384\000", i32 0, null, null, !29, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [reference] [from ] 93*0a6a1f1dSLionel Sambuc!29 = !{null, !30} 94*0a6a1f1dSLionel Sambuc!30 = !{!"0xf\00\000\0064\0064\000\001088", null, null, !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from _ZTS1A] 95*0a6a1f1dSLionel Sambuc!31 = !MDLocation(line: 16, scope: !17) 96*0a6a1f1dSLionel Sambuc!32 = !{!"0x100\00pr\0021\000", !17, !18, !33} ; [ DW_TAG_auto_variable ] [pr] [line 21] 97*0a6a1f1dSLionel Sambuc!33 = !{!"0x1f\00\000\000\000\000\000", null, null, !34, !"_ZTS1A"} ; [ DW_TAG_ptr_to_member_type ] [line 0, size 0, align 0, offset 0] [from ] 98*0a6a1f1dSLionel Sambuc!34 = !{!"0x15\00\000\000\000\000\0032768\000", i32 0, null, null, !29, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [rvalue reference] [from ] 99*0a6a1f1dSLionel Sambuc!35 = !MDLocation(line: 21, scope: !17) 100*0a6a1f1dSLionel Sambuc!36 = !MDLocation(line: 22, scope: !17) 101