brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · 006f2e7 Raw
66 lines · plain
1; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj2; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s3 4; test that the DW_AT_specification is a back edge in the file.5 6; Skip the definition of zed(foo*)7; CHECK: DW_TAG_subprogram8; CHECK: DW_TAG_class_type9; CHECK:   DW_TAG_subprogram10; CHECK:     DW_AT_linkage_name {{.*}} "_ZN3foo3barEv"11; CHECK: DW_TAG_subprogram12; CHECK-NOT: DW_TAG13; CHECK:   DW_AT_specification {{.*}} "_ZN3foo3barEv"14 15%struct.foo = type { i8 }16 17define void @_Z3zedP3foo(ptr %x) uwtable !dbg !5 {18entry:19  %x.addr = alloca ptr, align 820  store ptr %x, ptr %x.addr, align 821  call void @llvm.dbg.declare(metadata ptr %x.addr, metadata !23, metadata !DIExpression()), !dbg !2422  %0 = load ptr, ptr %x.addr, align 8, !dbg !2523  call void @_ZN3foo3barEv(ptr %0), !dbg !2524  ret void, !dbg !2725}26 27declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone28 29define linkonce_odr void @_ZN3foo3barEv(ptr %this) nounwind uwtable align 2 !dbg !20 {30entry:31  %this.addr = alloca ptr, align 832  store ptr %this, ptr %this.addr, align 833  call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !28, metadata !DIExpression()), !dbg !2934  %this1 = load ptr, ptr %this.addr35  ret void, !dbg !3036}37 38!llvm.dbg.cu = !{!0}39!llvm.module.flags = !{!33}40 41!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: FullDebug, file: !32, enums: !1, retainedTypes: !1, globals: !1, imports:  !1)42!1 = !{}43!5 = distinct !DISubprogram(name: "zed", linkageName: "_Z3zedP3foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !6, scope: !6, type: !7)44!6 = !DIFile(filename: "/home/espindola/llvm/test.cc", directory: "/home/espindola/tmpfs/build")45!7 = !DISubroutineType(types: !8)46!8 = !{null, !9}47!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !10)48!10 = !DICompositeType(tag: DW_TAG_class_type, name: "foo", line: 1, size: 8, align: 8, file: !32, elements: !11)49!11 = !{!12}50!12 = !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !6, scope: !10, type: !13)51!13 = !DISubroutineType(types: !14)52!14 = !{null, !15}53!15 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !10)54!20 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !6, scope: null, type: !13, declaration: !12)55!23 = !DILocalVariable(name: "x", line: 4, arg: 1, scope: !5, file: !6, type: !9)56!24 = !DILocation(line: 4, column: 15, scope: !5)57!25 = !DILocation(line: 4, column: 20, scope: !26)58!26 = distinct !DILexicalBlock(line: 4, column: 18, file: !6, scope: !5)59!27 = !DILocation(line: 4, column: 30, scope: !26)60!28 = !DILocalVariable(name: "this", line: 2, arg: 1, flags: DIFlagArtificial, scope: !20, file: !6, type: !15)61!29 = !DILocation(line: 2, column: 8, scope: !20)62!30 = !DILocation(line: 2, column: 15, scope: !31)63!31 = distinct !DILexicalBlock(line: 2, column: 14, file: !6, scope: !20)64!32 = !DIFile(filename: "/home/espindola/llvm/test.cc", directory: "/home/espindola/tmpfs/build")65!33 = !{i32 1, !"Debug Info Version", i32 3}66