| 1 |
; REQUIRES: object-emission |
| 2 |
; RUN: llvm-as < %s -o %t.bc |
| 3 |
; RUN: llvm-spirv %t.bc -o %t.spv |
| 4 |
; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o - | llvm-dis -o %t.ll |
| 5 |
|
| 6 |
; RUN: llc -mtriple=%triple -O0 -filetype=obj < %S/gmlt_profiling.ll | llvm-dwarfdump -v - | FileCheck %S/gmlt_profiling.ll |
| 7 |
|
| 8 |
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" |
| 9 |
target triple = "spir64-unknown-unknown" |
| 10 |
|
| 11 |
; CHECK: .debug_info |
| 12 |
; CHECK: DW_TAG_subprogram |
| 13 |
; CHECK-NOT: DW_TAG |
| 14 |
; CHECK: DW_AT_name {{.*}} "f1" |
| 15 |
; With debug-info-for-profiling attribute, we need to emit decl_file and |
| 16 |
; decl_line of the subprogram. |
| 17 |
; CHECK-NEXT: DW_AT_decl_file |
| 18 |
; CHECK-NEXT: DW_AT_decl_line |
| 19 |
|
| 20 |
; Function Attrs: nounwind uwtable |
| 21 |
define void @_Z2f1v() !dbg !4 { |
| 22 |
entry: |
| 23 |
ret void, !dbg !13 |
| 24 |
} |
| 25 |
|
| 26 |
!llvm.dbg.cu = !{!0} |
| 27 |
!llvm.module.flags = !{!10, !11} |
| 28 |
!llvm.ident = !{!12} |
| 29 |
|
| 30 |
!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) |
| 31 |
!1 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") |
| 32 |
!2 = !{} |
| 33 |
!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) |
| 34 |
!5 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") |
| 35 |
!6 = !DISubroutineType(types: !2) |
| 36 |
!10 = !{i32 2, !"Dwarf Version", i32 4} |
| 37 |
!11 = !{i32 2, !"Debug Info Version", i32 3} |
| 38 |
!12 = !{!"clang version 3.6.0 "} |
| 39 |
!13 = !DILocation(line: 1, column: 12, scope: !4) |