1 ; REQUIRES: object-emission 2 ; RUN: %llc_dwarf -O0 -filetype=obj < %S/gmlt_profiling.ll | llvm-dwarfdump -v - | FileCheck %S/gmlt_profiling.ll 3 4 ; CHECK: .debug_info 5 ; CHECK: DW_TAG_subprogram 6 ; CHECK-NOT: DW_TAG 7 ; CHECK: DW_AT_name {{.*}} "f1" 8 ; With debug-info-for-profiling attribute, we need to emit decl_file and 9 ; decl_line of the subprogram. 10 ; CHECK-NEXT: DW_AT_decl_file 11 ; CHECK-NEXT: DW_AT_decl_line 12 13 ; Function Attrs: nounwind uwtable 14 define void @_Z2f1v() !dbg !4 { 15 entry: 16 ret void, !dbg !13 17 } 18 19 !llvm.dbg.cu = !{!0} 20 !llvm.module.flags = !{!10, !11} 21 !llvm.ident = !{!12} 22 23 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2, debugInfoForProfiling: true) 24 !1 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") 25 !2 = !{} 26 !4 = distinct !DISubprogram(name: "f1", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, retainedNodes: !2) 27 !5 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") 28 !6 = !DISubroutineType(types: !2) 29 !10 = !{i32 2, !"Dwarf Version", i32 4} 30 !11 = !{i32 2, !"Debug Info Version", i32 3} 31 !12 = !{!"clang version 3.6.0 "} 32 !13 = !DILocation(line: 1, column: 12, scope: !4) 33