11 ; CHECK: .loc 1 [[@LINE-2]] 0 prologue_end
12 ; CHECK-NOT: .loc 1 0 0 prologue_end
14 ; The location of the prologue_end marker should not be affected by the presence
15 ; of CFI instructions.
17 ; RUN: llc -fast-isel -O0 -filetype=asm < %s | FileCheck %s
19 ; ModuleID = 'test1.cpp'
20 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
21 target triple = "aarch64-apple-ios"
23 %struct.B = type { %struct.A }
24 %struct.A = type { i32 (...)** }
26 @_ZTV1B = external unnamed_addr constant [4 x i8*]
28 ; Function Attrs: nounwind
29 define %struct.B* @_ZN1BC2Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg !28 {
31 tail call void @llvm.dbg.value(metadata %struct.B* %this, metadata !30, metadata !38), !dbg !39
32 %0 = getelementptr inbounds %struct.B, %struct.B* %this, i64 0, i32 0, !dbg !40
33 %call = tail call %struct.A* @_ZN1AC2Ev(%struct.A* %0) #3, !dbg !40
34 %1 = getelementptr inbounds %struct.B, %struct.B* %this, i64 0, i32 0, i32 0, !dbg !40
35 store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @_ZTV1B, i64 0, i64 2) to i32 (...)**), i32 (...)*** %1, align 8, !dbg !40, !tbaa !41
36 ret %struct.B* %this, !dbg !40
39 declare %struct.A* @_ZN1AC2Ev(%struct.A*)
41 ; Function Attrs: nounwind
42 define %struct.B* @_ZN1BC1Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg !32 {
44 tail call void @llvm.dbg.value(metadata %struct.B* %this, metadata !34, metadata !38), !dbg !44
45 tail call void @llvm.dbg.value(metadata %struct.B* %this, metadata !45, metadata !38) #3, !dbg !47
46 %0 = getelementptr inbounds %struct.B, %struct.B* %this, i64 0, i32 0, !dbg !48
47 %call.i = tail call %struct.A* @_ZN1AC2Ev(%struct.A* %0) #3, !dbg !48
48 %1 = getelementptr inbounds %struct.B, %struct.B* %this, i64 0, i32 0, i32 0, !dbg !48
49 store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @_ZTV1B, i64 0, i64 2) to i32 (...)**), i32 (...)*** %1, align 8, !dbg !48, !tbaa !41
50 ret %struct.B* %this, !dbg !46
53 ; Function Attrs: nounwind readnone
54 declare void @llvm.dbg.value(metadata, metadata, metadata) #2
56 attributes #0 = { nounwind }
57 attributes #2 = { nounwind readnone }
58 attributes #3 = { nounwind }
61 !llvm.module.flags = !{!35, !36}
64 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2)
65 !1 = !DIFile(filename: "<stdin>", directory: "")
68 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 5, size: 64, align: 64, file: !5, elements: !6, vtableHolder: !13, identifier: "_ZTS1B")
69 !5 = !DIFile(filename: "test1.cpp", directory: "")
71 !7 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !4, baseType: !13)
72 !8 = !DISubprogram(name: "B", line: 6, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !4, type: !9)
73 !9 = !DISubroutineType(types: !10)
75 !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
76 !12 = !DISubprogram(name: "~B", line: 7, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !4, type: !9, containingType: !4)
77 !13 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 64, align: 64, file: !5, elements: !14, vtableHolder: !13, identifier: "_ZTS1A")
78 !14 = !{!15, !22, !26}
79 !15 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 64, flags: DIFlagArtificial, file: !5, scope: !16, baseType: !17)
80 !16 = !DIFile(filename: "test1.cpp", directory: "")
81 !17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, baseType: !18)
82 !18 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", size: 64, baseType: !19)
83 !19 = !DISubroutineType(types: !20)
85 !21 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
86 !22 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !5, scope: !13, type: !23)
87 !23 = !DISubroutineType(types: !24)
89 !25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !13)
90 !26 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !13, type: !23, containingType: !13)
91 !28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !4, type: !9, declaration: !8, retainedNodes: !29)
93 !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
94 !31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
95 !32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !4, type: !9, declaration: !8, retainedNodes: !33)
97 !34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !31)
98 !35 = !{i32 2, !"Dwarf Version", i32 4}
99 !36 = !{i32 2, !"Debug Info Version", i32 3}
100 !37 = !{!"clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)"}
101 !38 = !DIExpression()
102 !39 = !DILocation(line: 0, scope: !28)
103 !40 = !DILocation(line: 9, scope: !28)
104 !41 = !{!42, !42, i64 0}
105 !42 = !{!"vtable pointer", !43, i64 0}
106 !43 = !{!"Simple C/C++ TBAA"}
107 !44 = !DILocation(line: 0, scope: !32)
108 !45 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
109 !46 = !DILocation(line: 9, scope: !32)
110 !47 = !DILocation(line: 0, scope: !28, inlinedAt: !46)
111 !48 = !DILocation(line: 9, scope: !28, inlinedAt: !46)