summaryrefslogtreecommitdiff
path: root/test/CodeGen/NVPTX
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-09-13 01:12:59 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-09-13 01:12:59 +0000
commit5420de3f15e01ad9dfb05b08e2600ccff10c5817 (patch)
tree1f35fb90b9c4d1b953d7f3ec837625a2a0bdce23 /test/CodeGen/NVPTX
parent8d684cae12593b494408a95774f03c812b5b37ed (diff)
DebugInfo: New metadata representation for global variables.
This patch reverses the edge from DIGlobalVariable to GlobalVariable. This will allow us to more easily preserve debug info metadata when manipulating global variables. Fixes PR30362. A program for upgrading test cases is attached to that bug. Differential Revision: http://reviews.llvm.org/D20147 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/NVPTX')
-rw-r--r--test/CodeGen/NVPTX/generic-to-nvvm-ir.ll5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/CodeGen/NVPTX/generic-to-nvvm-ir.ll b/test/CodeGen/NVPTX/generic-to-nvvm-ir.ll
index 4b33d270035..623a2d8740c 100644
--- a/test/CodeGen/NVPTX/generic-to-nvvm-ir.ll
+++ b/test/CodeGen/NVPTX/generic-to-nvvm-ir.ll
@@ -7,7 +7,7 @@ target triple = "nvptx64-nvidia-cuda"
; Generic space variables should be converted to global space AKA addrspace(1).
; CHECK-DAG: @static_var = {{.*}}addrspace(1)
-@static_var = externally_initialized global i8 0, align 1
+@static_var = externally_initialized global i8 0, align 1, !dbg !4
; CHECK-DAG: @.str = {{.*}}addrspace(1)
@.str = private unnamed_addr constant [4 x i8] c"XXX\00", align 1
@@ -43,12 +43,11 @@ declare void @extfunc(i8 signext)
; Find list of global variables and make sure it's the one used by DICompileUnit
; CHECK: [[GLOBALSNODE]] = !{[[GVNODE:![0-9]+]]}
!4 = distinct !DIGlobalVariable(name: "static_var", scope: !0, file: !1, line: 2, type: !5, isLocal: false,
- isDefinition: true, variable: i8* @static_var)
+ isDefinition: true)
; Debug info must also be updated to reflect new address space.
; CHECK: [[GVNODE]] = distinct !DIGlobalVariable(name: "static_var"
; CHECK-SAME: scope: [[CUNODE]]
; CHECK-SAME: type: [[TYPENODE:![0-9]+]]
-; CHECK-SAME: variable: i8* addrspacecast (i8 addrspace(1)* @static_var to i8*)
!5 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
; CHECK: [[TYPENODE]] = !DIBasicType(name: "char"
!6 = !{i32 2, !"Dwarf Version", i32 4}