| 1 |
; Test checks that dwoId and splitDebugFilename is preserved from LLVM IR to spirv |
| 2 |
; and spirv to LLVM IR translation. |
| 3 |
|
| 4 |
; RUN: llvm-as %s -o %t.bc |
| 5 |
; RUN: llvm-spirv %t.bc --spirv-debug-info-version=nonsemantic-shader-200 -spirv-text -o - | FileCheck %s --check-prefix CHECK-SPIRV |
| 6 |
; RUN: llvm-spirv %t.bc --spirv-debug-info-version=nonsemantic-shader-200 -o %t.spv |
| 7 |
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc |
| 8 |
; RUN: llvm-dis %t.rev.bc -o %t.rev.ll |
| 9 |
; RUN: FileCheck %s --input-file %t.rev.ll --check-prefix CHECK-LLVM |
| 10 |
|
| 11 |
; CHECK-SPIRV: String [[#stringA_id:]] "11111" |
| 12 |
; CHECK-SPIRV: String [[#stringA_sf:]] "debugA_info.dwo" |
| 13 |
; CHECK-SPIRV: [[#buildID_A:]] [[#]] DebugBuildIdentifier [[#stringA_id]] |
| 14 |
; CHECK-SPIRV: [[#storageID_A:]] [[#]] DebugStoragePath [[#stringA_sf]] |
| 15 |
|
| 16 |
; CHECK-LLVM: !DICompileUnit |
| 17 |
; CHECK-LLVM-SAME: splitDebugFilename: "debugA_info.dwo" |
| 18 |
; CHECK-LLVM-SAME: dwoId: 11111 |
| 19 |
; CHECK-LLVM: !DICompileUnit |
| 20 |
; CHECK-LLVM-SAME: splitDebugFilename: "debugA_info.dwo" |
| 21 |
; CHECK-LLVM-SAME: dwoId: 11111 |
| 22 |
|
| 23 |
!llvm.dbg.cu = !{!7, !0} |
| 24 |
!llvm.module.flags = !{!3, !4} |
| 25 |
|
| 26 |
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "Clang", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "debugA_info.dwo", emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2, dwoId: 11111) |
| 27 |
!1 = !DIFile(filename: "<stdin>", directory: "/") |
| 28 |
!2 = !{} |
| 29 |
!3 = !{i32 2, !"Dwarf Version", i32 4} |
| 30 |
!4 = !{i32 2, !"Debug Info Version", i32 3} |
| 31 |
!5 = !{!6} |
| 32 |
!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |
| 33 |
!7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "Clang", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "debugA_info.dwo", dwoId: 11111, emissionKind: FullDebug, retainedTypes: !5) |