64 lines · plain
1; RUN: %llc_dwarf -filetype=obj -O0 < %s | llvm-dwarfdump -debug-info - | FileCheck %s2 3; generated by clang from:4; struct foo {5; void f1();6; void f2();7; };8;9; void foo::f1() {10; }11 12; CHECK: DW_TAG_structure_type13; CHECK-NEXT: DW_AT_name ("foo")14; CHECK-NOT: NULL15; CHECK: DW_TAG_subprogram16; CHECK-NOT: NULL17; CHECK: DW_AT_name ("f1")18; CHECK: DW_TAG_subprogram19; CHECK-NOT: NULL20; CHECK: DW_AT_name ("f2")21 22 23%struct.foo = type { i8 }24 25; Function Attrs: nounwind uwtable26define void @_ZN3foo2f1Ev(ptr %this) #0 align 2 !dbg !14 {27entry:28 %this.addr = alloca ptr, align 829 store ptr %this, ptr %this.addr, align 830 call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !16, metadata !DIExpression()), !dbg !1831 %this1 = load ptr, ptr %this.addr32 ret void, !dbg !1933}34 35; Function Attrs: nounwind readnone36declare void @llvm.dbg.declare(metadata, metadata, metadata) #137 38attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }39attributes #1 = { nounwind readnone }40 41!llvm.dbg.cu = !{!0}42!llvm.module.flags = !{!15, !20}43 44!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2)45!1 = !DIFile(filename: "member-order.cpp", directory: "/tmp/dbginfo")46!2 = !{}47!3 = !{!4}48!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS3foo")49!5 = !{!6, !11}50!6 = !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !4, type: !7)51!7 = !DISubroutineType(types: !8)52!8 = !{null, !9}53!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)54!10 = !{i32 786468}55!11 = !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !4, type: !7)56!12 = !{i32 786468}57!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: null, type: !7, declaration: !6, retainedNodes: !2)58!15 = !{i32 2, !"Dwarf Version", i32 4}59!16 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !14, type: !17)60!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)61!18 = !DILocation(line: 0, scope: !14)62!19 = !DILocation(line: 7, scope: !14)63!20 = !{i32 1, !"Debug Info Version", i32 3}64