brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.4 KiB · 2f83b72 Raw
105 lines · plain
1; RUN: llc -mtriple=x86_64-unknown-linux-gnu %s -o %t -filetype=obj2; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s3; RUN: llvm-as < %s | llvm-dis | FileCheck --check-prefix=CHECK-DIS %s4 5; CHECK: 0x0000000b: DW_TAG_compile_unit6; CHECK:               DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000035] = "foo.cpp")7; CHECK: 0x{{[0-9a-f]+}}:   DW_TAG_class_type8; CHECK:                 DW_AT_name [DW_FORM_strp]       ( .debug_str[0x{{[0-9a-f]+}}] = "D")9; CHECK: 0x{{[0-9a-f]+}}:     DW_TAG_member10; CHECK:                   DW_AT_name [DW_FORM_strp]     ( .debug_str[0x{{[0-9a-f]+}}] = "c1")11; CHECK: DW_TAG_subprogram12; CHECK-NEXT: DW_AT_name [DW_FORM_strp]     ( .debug_str[0x{{[0-9a-f]+}}] = "D")13; CHECK: DW_TAG_formal_parameter14; CHECK: DW_AT_artificial [DW_FORM_flag_present]       (true)15 16; CHECK-DIS: DIFlagArtificial17 18%class.D = type { i32, i32, i32, i32 }19 20@_ZN1DC1Ev = alias void (ptr), ptr @_ZN1DC2Ev21@_ZN1DC1ERKS_ = alias void (ptr, ptr), ptr @_ZN1DC2ERKS_22 23define void @_ZN1DC2Ev(ptr nocapture %this) unnamed_addr nounwind uwtable align 2 !dbg !5 {24entry:25  tail call void @llvm.dbg.value(metadata ptr %this, metadata !29, metadata !DIExpression()), !dbg !3626  store i32 1, ptr %this, align 4, !dbg !3727  %c2 = getelementptr inbounds %class.D, ptr %this, i64 0, i32 1, !dbg !4228  store i32 2, ptr %c2, align 4, !dbg !4229  %c3 = getelementptr inbounds %class.D, ptr %this, i64 0, i32 2, !dbg !4330  store i32 3, ptr %c3, align 4, !dbg !4331  %c4 = getelementptr inbounds %class.D, ptr %this, i64 0, i32 3, !dbg !4432  store i32 4, ptr %c4, align 4, !dbg !4433  ret void, !dbg !4534}35 36define void @_ZN1DC2ERKS_(ptr nocapture %this, ptr nocapture %d) unnamed_addr nounwind uwtable align 2 !dbg !31 {37entry:38  tail call void @llvm.dbg.value(metadata ptr %this, metadata !34, metadata !DIExpression()), !dbg !4639  tail call void @llvm.dbg.value(metadata ptr %d, metadata !35, metadata !DIExpression()), !dbg !4640  %0 = load i32, ptr %d, align 4, !dbg !4741  store i32 %0, ptr %this, align 4, !dbg !4742  %c2 = getelementptr inbounds %class.D, ptr %d, i64 0, i32 1, !dbg !4943  %1 = load i32, ptr %c2, align 4, !dbg !4944  %c23 = getelementptr inbounds %class.D, ptr %this, i64 0, i32 1, !dbg !4945  store i32 %1, ptr %c23, align 4, !dbg !4946  %c3 = getelementptr inbounds %class.D, ptr %d, i64 0, i32 2, !dbg !5047  %2 = load i32, ptr %c3, align 4, !dbg !5048  %c34 = getelementptr inbounds %class.D, ptr %this, i64 0, i32 2, !dbg !5049  store i32 %2, ptr %c34, align 4, !dbg !5050  %c4 = getelementptr inbounds %class.D, ptr %d, i64 0, i32 3, !dbg !5151  %3 = load i32, ptr %c4, align 4, !dbg !5152  %c45 = getelementptr inbounds %class.D, ptr %this, i64 0, i32 3, !dbg !5153  store i32 %3, ptr %c45, align 4, !dbg !5154  ret void, !dbg !5255}56 57declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone58 59!llvm.dbg.cu = !{!0}60!llvm.module.flags = !{!54}61 62!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 167506) (llvm/trunk 167505)", isOptimized: true, emissionKind: FullDebug, file: !53, enums: !1, retainedTypes: !1, globals: !1, imports:  !1)63!1 = !{}64!5 = distinct !DISubprogram(name: "D", linkageName: "_ZN1DC2Ev", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 12, file: !6, scope: null, type: !7, declaration: !17, retainedNodes: !27)65!6 = !DIFile(filename: "foo.cpp", directory: "/usr/local/google/home/echristo")66!7 = !DISubroutineType(types: !8)67!8 = !{null, !9}68!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !10)69!10 = !DICompositeType(tag: DW_TAG_class_type, name: "D", line: 1, size: 128, align: 32, file: !53, elements: !11)70!11 = !{!12, !14, !15, !16, !17, !20}71!12 = !DIDerivedType(tag: DW_TAG_member, name: "c1", line: 6, size: 32, align: 32, flags: DIFlagPrivate, file: !53, scope: !10, baseType: !13)72!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)73!14 = !DIDerivedType(tag: DW_TAG_member, name: "c2", line: 7, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !53, scope: !10, baseType: !13)74!15 = !DIDerivedType(tag: DW_TAG_member, name: "c3", line: 8, size: 32, align: 32, offset: 64, flags: DIFlagPrivate, file: !53, scope: !10, baseType: !13)75!16 = !DIDerivedType(tag: DW_TAG_member, name: "c4", line: 9, size: 32, align: 32, offset: 96, flags: DIFlagPrivate, file: !53, scope: !10, baseType: !13)76!17 = !DISubprogram(name: "D", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !6, scope: !10, type: !7)77!20 = !DISubprogram(name: "D", line: 4, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !6, scope: !10, type: !21)78!21 = !DISubroutineType(types: !22)79!22 = !{null, !9, !23}80!23 = !DIDerivedType(tag: DW_TAG_reference_type, size: 64, align: 64, baseType: !24)81!24 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !10)82!27 = !{!29}83!29 = !DILocalVariable(name: "this", line: 12, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !5, file: !6, type: !30)84!30 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !10)85!31 = distinct !DISubprogram(name: "D", linkageName: "_ZN1DC2ERKS_", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 19, file: !6, scope: null, type: !21, declaration: !20, retainedNodes: !32)86!32 = !{!34, !35}87!34 = !DILocalVariable(name: "this", line: 19, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !31, file: !6, type: !30)88!35 = !DILocalVariable(name: "d", line: 19, arg: 2, scope: !31, file: !6, type: !23)89!36 = !DILocation(line: 12, scope: !5)90!37 = !DILocation(line: 13, scope: !38)91!38 = distinct !DILexicalBlock(line: 12, column: 0, file: !6, scope: !5)92!42 = !DILocation(line: 14, scope: !38)93!43 = !DILocation(line: 15, scope: !38)94!44 = !DILocation(line: 16, scope: !38)95!45 = !DILocation(line: 17, scope: !38)96!46 = !DILocation(line: 19, scope: !31)97!47 = !DILocation(line: 20, scope: !48)98!48 = distinct !DILexicalBlock(line: 19, column: 0, file: !6, scope: !31)99!49 = !DILocation(line: 21, scope: !48)100!50 = !DILocation(line: 22, scope: !48)101!51 = !DILocation(line: 23, scope: !48)102!52 = !DILocation(line: 24, scope: !48)103!53 = !DIFile(filename: "foo.cpp", directory: "/usr/local/google/home/echristo")104!54 = !{i32 1, !"Debug Info Version", i32 3}105