llvm/test/Bitcode/diglobalvariable-3.8.ll
Peter Collingbourne 5420de3f15 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
2016-09-13 01:12:59 +00:00

9 lines
297 B
LLVM

; RUN: llvm-dis -o - %s.bc | FileCheck %s
; CHECK: !0 = distinct !DIGlobalVariable(name: "a", scope: null, isLocal: false, isDefinition: true, expr: !1)
; CHECK: !1 = !DIExpression(DW_OP_constu, 42, DW_OP_stack_value)
!named = !{!0}
!0 = distinct !DIGlobalVariable(name: "a", variable: i32 42)