| 1 |
;; Ensure that reverse translation can handle an Expression in |
| 2 |
;; a DebugGlobalVariable's Variable field. |
| 3 |
;; This is used to preserve a DIExpressions in a DIGlobalVariableExpression. |
| 4 |
|
| 5 |
; RUN: llvm-spirv -to-binary %s -o %t.spv |
| 6 |
; RUN: llvm-spirv -r -o %t.rev.bc %t.spv |
| 7 |
; RUN: llvm-dis %t.rev.bc -o %t.rev.ll |
| 8 |
; RUN: FileCheck %s --input-file %t.rev.ll |
| 9 |
|
| 10 |
; CHECK: ![[#]] = !DIGlobalVariableExpression(var: ![[#GV:]], expr: !DIExpression(DW_OP_constu, 1, DW_OP_stack_value)) |
| 11 |
; CHECK: ![[#GV]] = distinct !DIGlobalVariable(name: "true", scope: ![[#]], file: ![[#]], line: 3777, type: ![[#]], isLocal: true, isDefinition: true) |
| 12 |
|
| 13 |
119734787 65792 393230 19 0 |
| 14 |
2 Capability Addresses |
| 15 |
2 Capability Linkage |
| 16 |
2 Capability Kernel |
| 17 |
5 ExtInstImport 1 "OpenCL.std" |
| 18 |
8 ExtInstImport 2 "OpenCL.DebugInfo.100" |
| 19 |
3 MemoryModel 2 2 |
| 20 |
7 String 3 "/path/to/test.cpp" |
| 21 |
4 String 8 "bool" |
| 22 |
4 String 13 "true" |
| 23 |
3 String 14 "" |
| 24 |
3 Source 0 0 |
| 25 |
8 ModuleProcessed "Debug info producer: clang" |
| 26 |
4 TypeInt 9 32 0 |
| 27 |
4 Constant 9 10 8 |
| 28 |
2 TypeVoid 4 |
| 29 |
|
| 30 |
5 ExtInst 4 5 2 DebugInfoNone |
| 31 |
7 ExtInst 4 6 2 DebugSource 3 5 |
| 32 |
9 ExtInst 4 7 2 DebugCompilationUnit 65536 4 6 6 |
| 33 |
8 ExtInst 4 11 2 DebugTypeBasic 8 10 2 |
| 34 |
7 ExtInst 4 12 2 DebugTypeQualifier 11 0 |
| 35 |
7 ExtInst 4 15 2 DebugOperation 8 1 |
| 36 |
6 ExtInst 4 16 2 DebugOperation 7 |
| 37 |
7 ExtInst 4 17 2 DebugExpression 15 16 |
| 38 |
14 ExtInst 4 18 2 DebugGlobalVariable 13 12 6 3777 0 7 14 17 12 |
| 39 |
|