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 !dbg !28 { 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, %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, %struct.B* %this, i32 0, i32 0, i32 0, !dbg !42 36 store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*], [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 !dbg !32 { 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, %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, %struct.B* %this, i32 0, i32 0, i32 0, !dbg !50 50 store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*], [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 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)", isOptimized: true, emissionKind: 1, file: !1, enums: !2, retainedTypes: !3, subprograms: !27, globals: !2, imports: !2) 66 !1 = !DIFile(filename: "<stdin>", directory: "") 67 !2 = !{} 68 !3 = !{!4, !13} 69 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 5, size: 32, align: 32, file: !5, elements: !6, vtableHolder: !"_ZTS1A", identifier: "_ZTS1B") 70 !5 = !DIFile(filename: "test1.cpp", directory: "") 71 !6 = !{!7, !8, !12} 72 !7 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !"_ZTS1B", baseType: !"_ZTS1A") 73 !8 = !DISubprogram(name: "B", line: 6, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !"_ZTS1B", type: !9) 74 !9 = !DISubroutineType(types: !10) 75 !10 = !{null, !11} 76 !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B") 77 !12 = !DISubprogram(name: "~B", line: 7, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !"_ZTS1B", type: !9, containingType: !"_ZTS1B") 78 !13 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 32, align: 32, file: !5, elements: !14, vtableHolder: !"_ZTS1A", identifier: "_ZTS1A") 79 !14 = !{!15, !22, !26} 80 !15 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 32, flags: DIFlagArtificial, file: !5, scope: !16, baseType: !17) 81 !16 = !DIFile(filename: "test1.cpp", directory: "") 82 !17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, baseType: !18) 83 !18 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", size: 32, baseType: !19) 84 !19 = !DISubroutineType(types: !20) 85 !20 = !{!21} 86 !21 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 87 !22 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !5, scope: !"_ZTS1A", type: !23) 88 !23 = !DISubroutineType(types: !24) 89 !24 = !{null, !25} 90 !25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") 91 !26 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !"_ZTS1A", type: !23, containingType: !"_ZTS1A") 92 !27 = !{!28, !32} 93 !28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !29) 94 !29 = !{!30} 95 !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31) 96 !31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"_ZTS1B") 97 !32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !33) 98 !33 = !{!34} 99 !34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !31) 100 !35 = !{i32 2, !"Dwarf Version", i32 4} 101 !36 = !{i32 2, !"Debug Info Version", i32 3} 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 = !DIExpression() 106 !41 = !DILocation(line: 0, scope: !28) 107 !42 = !DILocation(line: 9, scope: !28) 108 !43 = !{!44, !44, i64 0} 109 !44 = !{!"vtable pointer", !45, i64 0} 110 !45 = !{!"Simple C/C++ TBAA"} 111 !46 = !DILocation(line: 0, scope: !32) 112 !47 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31) 113 !48 = !DILocation(line: 9, scope: !32) 114 !49 = !DILocation(line: 0, scope: !28, inlinedAt: !48) 115 !50 = !DILocation(line: 9, scope: !28, inlinedAt: !48) 116