blob: f989a73e63df04d31b3f9497bfdd3e73e87fddea [file] [log] [blame]
Dehao Chen0944a8c2017-02-01 22:45:09 +00001; REQUIRES: object-emission
2; RUN: %llc_dwarf -O0 -filetype=obj < %S/gmlt_profiling.ll | llvm-dwarfdump - | FileCheck %S/gmlt_profiling.ll
3
4; There's a darwin specific test in X86/gmlt, so it's okay to XFAIL this here.
5; XFAIL: darwin
6
7; CHECK: .debug_info
8; CHECK: DW_TAG_subprogram
9; CHECK-NOT: DW_TAG
10; CHECK: DW_AT_name {{.*}} "f1"
11; With debug-info-for-profiling attribute, we need to emit decl_file and
12; decl_line of the subprogram.
13; CHECK-NEXT: DW_AT_decl_file
14; CHECK-NEXT: DW_AT_decl_line
15
16; Function Attrs: nounwind uwtable
17define void @_Z2f1v() !dbg !4 {
18entry:
19 ret void, !dbg !13
20}
21
22!llvm.dbg.cu = !{!0}
23!llvm.module.flags = !{!10, !11}
24!llvm.ident = !{!12}
25
26!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)
27!1 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo")
28!2 = !{}
29!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, variables: !2)
30!5 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo")
31!6 = !DISubroutineType(types: !2)
32!10 = !{i32 2, !"Dwarf Version", i32 4}
33!11 = !{i32 2, !"Debug Info Version", i32 3}
34!12 = !{!"clang version 3.6.0 "}
35!13 = !DILocation(line: 1, column: 12, scope: !4)