brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.7 KiB · 596727d Raw
102 lines · plain
1; RUN: llc -mtriple=x86_64-apple-darwin -debugger-tune=gdb -dwarf-version=5 -filetype=obj < %s | \2; RUN:      llvm-dwarfdump -v -debug-info - | FileCheck %s --check-prefixes=CHECK,CHECK-GDB3 4; RUN: llc -mtriple=x86_64-apple-darwin -debugger-tune=lldb -dwarf-version=4 -filetype=obj < %s | \5; RUN:      llvm-dwarfdump -v -debug-info - | FileCheck %s --check-prefixes=CHECK,CHECK-LLDB-DWARF46 7; RUN: llc -mtriple=x86_64-apple-darwin -debugger-tune=lldb -dwarf-version=5 -filetype=obj < %s | \8; RUN:      llvm-dwarfdump -v -debug-info - | FileCheck %s --check-prefixes=CHECK,CHECK-LLDB-DWARF59 10; CHECK: DW_TAG_formal_parameter [11; CHECK-NOT: ""12; CHECK: DW_TAG13; CHECK: DW_TAG_class_type14; CHECK: [[DECL:0x[0-9a-f]+]]: DW_TAG_subprogram15; CHECK:                         DW_AT_name {{.*}} "A"16; CHECK-LLDB-DWARF5:             DW_AT_object_pointer [DW_FORM_implicit_const] (0)17; CHECK-GDB-NOT:                 DW_AT_object_pointer18; CHECK-LLDB-DWARF4-NOT:         DW_AT_object_pointer19; CHECK: DW_TAG_formal_parameter20;21; CHECK: DW_TAG_subprogram22; CHECK:   DW_AT_object_pointer [DW_FORM_ref4]     (cu + 0x{{[0-9a-f]*}} => {[[PARAM:0x[0-9a-f]*]]})23; CHECK:   DW_AT_specification [DW_FORM_ref4] (cu + {{.*}} => {[[DECL]]}24; CHECK: [[PARAM]]:     DW_TAG_formal_parameter25; CHECK-NOT: DW_TAG26; CHECK: DW_AT_name27; CHECK-SAME        = "this")28 29%class.A = type { i32 }30 31define i32 @_Z3fooi(i32) nounwind uwtable ssp !dbg !5 {32entry:33  %.addr = alloca i32, align 434  %a = alloca %class.A, align 435  store i32 %0, ptr %.addr, align 436  call void @llvm.dbg.declare(metadata ptr %.addr, metadata !36, metadata !DIExpression()), !dbg !3537  call void @llvm.dbg.declare(metadata ptr %a, metadata !21, metadata !DIExpression()), !dbg !2338  call void @_ZN1AC1Ev(ptr %a), !dbg !2439  %1 = load i32, ptr %a, align 4, !dbg !2540  ret i32 %1, !dbg !2541}42 43declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone44 45define linkonce_odr void @_ZN1AC1Ev(ptr %this) unnamed_addr nounwind uwtable ssp align 2 !dbg !10 {46entry:47  %this.addr = alloca ptr, align 848  store ptr %this, ptr %this.addr, align 849  call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !26, metadata !DIExpression()), !dbg !2850  %this1 = load ptr, ptr %this.addr51  call void @_ZN1AC2Ev(ptr %this1), !dbg !2952  ret void, !dbg !2953}54 55define linkonce_odr void @_ZN1AC2Ev(ptr %this) unnamed_addr nounwind uwtable ssp align 2 !dbg !20 {56entry:57  %this.addr = alloca ptr, align 858  store ptr %this, ptr %this.addr, align 859  call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !30, metadata !DIExpression()), !dbg !3160  %this1 = load ptr, ptr %this.addr61  store i32 0, ptr %this1, align 4, !dbg !3262  ret void, !dbg !3463}64 65!llvm.dbg.cu = !{!0}66!llvm.module.flags = !{!38}67 68!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 163586) (llvm/trunk 163570)", isOptimized: false, emissionKind: FullDebug, file: !37, enums: !1, retainedTypes: !1, globals: !1, imports:  !1)69!1 = !{}70!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !6, scope: !6, type: !7, retainedNodes: !1)71!6 = !DIFile(filename: "bar.cpp", directory: "/Users/echristo/debug-tests")72!7 = !DISubroutineType(types: !8)73!8 = !{!9}74!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)75!10 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC1Ev", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !6, scope: null, type: !11, declaration: !17, retainedNodes: !1)76!11 = !DISubroutineType(types: !12)77!12 = !{null, !13}78!13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !14)79!14 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 32, align: 32, file: !37, elements: !15)80!15 = !{!16, !17}81!16 = !DIDerivedType(tag: DW_TAG_member, name: "m_a", line: 4, size: 32, align: 32, file: !37, scope: !14, baseType: !9)82!17 = !DISubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: !14, type: !11)83!20 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !6, scope: null, type: !11, declaration: !17, retainedNodes: !1)84!21 = !DILocalVariable(name: "a", line: 8, scope: !22, file: !6, type: !14)85!22 = distinct !DILexicalBlock(line: 7, column: 11, file: !6, scope: !5)86!23 = !DILocation(line: 8, column: 5, scope: !22)87!24 = !DILocation(line: 8, column: 6, scope: !22)88!25 = !DILocation(line: 9, column: 3, scope: !22)89!26 = !DILocalVariable(name: "this", line: 3, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !10, file: !6, type: !27)90!27 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !14)91!28 = !DILocation(line: 3, column: 3, scope: !10)92!29 = !DILocation(line: 3, column: 18, scope: !10)93!30 = !DILocalVariable(name: "this", line: 3, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !20, file: !6, type: !27)94!31 = !DILocation(line: 3, column: 3, scope: !20)95!32 = !DILocation(line: 3, column: 9, scope: !33)96!33 = distinct !DILexicalBlock(line: 3, column: 7, file: !6, scope: !20)97!34 = !DILocation(line: 3, column: 18, scope: !33)98!35 = !DILocation(line: 7, scope: !5)99!36 = !DILocalVariable(name: "", line: 7, arg: 1, scope: !5, file: !6, type: !9)100!37 = !DIFile(filename: "bar.cpp", directory: "/Users/echristo/debug-tests")101!38 = !{i32 1, !"Debug Info Version", i32 3}102