108 lines · plain
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_end12; CHECK-NOT: .loc 1 0 0 prologue_end13 14; The location of the prologue_end marker should not be affected by the presence15; of CFI instructions.16 17; RUN: llc -fast-isel -O0 -filetype=asm < %s | FileCheck %s18 19; ModuleID = 'test1.cpp'20target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"21target triple = "aarch64-apple-ios"22 23%struct.B = type { %struct.A }24%struct.A = type { ptr }25 26@_ZTV1B = external unnamed_addr constant [4 x ptr]27 28; Function Attrs: nounwind29define ptr @_ZN1BC2Ev(ptr %this) unnamed_addr #0 align 2 !dbg !28 {30entry:31 tail call void @llvm.dbg.value(metadata ptr %this, metadata !30, metadata !38), !dbg !3932 %call = tail call ptr @_ZN1AC2Ev(ptr %this) #3, !dbg !4033 store ptr getelementptr inbounds ([4 x ptr], ptr @_ZTV1B, i64 0, i64 2), ptr %this, align 8, !dbg !40, !tbaa !4134 ret ptr %this, !dbg !4035}36 37declare ptr @_ZN1AC2Ev(ptr)38 39; Function Attrs: nounwind40define ptr @_ZN1BC1Ev(ptr %this) unnamed_addr #0 align 2 !dbg !32 {41entry:42 tail call void @llvm.dbg.value(metadata ptr %this, metadata !34, metadata !38), !dbg !4443 tail call void @llvm.dbg.value(metadata ptr %this, metadata !45, metadata !38) #3, !dbg !4744 %call.i = tail call ptr @_ZN1AC2Ev(ptr %this) #3, !dbg !4845 store ptr getelementptr inbounds ([4 x ptr], ptr @_ZTV1B, i64 0, i64 2), ptr %this, align 8, !dbg !48, !tbaa !4146 ret ptr %this, !dbg !4647}48 49; Function Attrs: nounwind readnone50declare void @llvm.dbg.value(metadata, metadata, metadata) #251 52attributes #0 = { nounwind }53attributes #2 = { nounwind readnone }54attributes #3 = { nounwind }55 56!llvm.dbg.cu = !{!0}57!llvm.module.flags = !{!35, !36}58!llvm.ident = !{!37}59 60!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)61!1 = !DIFile(filename: "<stdin>", directory: "")62!2 = !{}63!3 = !{!4, !13}64!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 5, size: 64, align: 64, file: !5, elements: !6, vtableHolder: !13, identifier: "_ZTS1B")65!5 = !DIFile(filename: "test1.cpp", directory: "")66!6 = !{!7, !8, !12}67!7 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !4, baseType: !13)68!8 = !DISubprogram(name: "B", line: 6, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !4, type: !9)69!9 = !DISubroutineType(types: !10)70!10 = !{null, !11}71!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)72!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)73!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 64, align: 64, file: !5, elements: !14, vtableHolder: !13, identifier: "_ZTS1A")74!14 = !{!15, !22, !26}75!15 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 64, flags: DIFlagArtificial, file: !5, scope: !16, baseType: !17)76!16 = !DIFile(filename: "test1.cpp", directory: "")77!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, baseType: !18)78!18 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", size: 64, baseType: !19)79!19 = !DISubroutineType(types: !20)80!20 = !{!21}81!21 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)82!22 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !5, scope: !13, type: !23)83!23 = !DISubroutineType(types: !24)84!24 = !{null, !25}85!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !13)86!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)87!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)88!29 = !{!30}89!30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)90!31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)91!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)92!33 = !{!34}93!34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !31)94!35 = !{i32 2, !"Dwarf Version", i32 4}95!36 = !{i32 2, !"Debug Info Version", i32 3}96!37 = !{!"clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)"}97!38 = !DIExpression()98!39 = !DILocation(line: 0, scope: !28)99!40 = !DILocation(line: 9, scope: !28)100!41 = !{!42, !42, i64 0}101!42 = !{!"vtable pointer", !43, i64 0}102!43 = !{!"Simple C/C++ TBAA"}103!44 = !DILocation(line: 0, scope: !32)104!45 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)105!46 = !DILocation(line: 9, scope: !32)106!47 = !DILocation(line: 0, scope: !28, inlinedAt: !46)107!48 = !DILocation(line: 9, scope: !28, inlinedAt: !46)108