1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/Assembler/global-addrspace-forwardref.ll
Karl Schimpf f002d274d3 Allow global address space forward decls using IDs in .ll files.
Summary:
This fixes bugzilla bug 24656. Fixes the case where there is a forward
reference to a global variable using an ID (i.e. @0). It does this by
passing the address space of the initializer pointer for which the
forward referenced global is used.

llvm-svn: 246788
2015-09-03 18:06:44 +00:00

19 lines
482 B
LLVM

; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s
; Make sure the address space of forward decls is preserved
; CHECK: @a2 = global i8 addrspace(1)* @a
; CHECK: @a = addrspace(1) global i8 0
@a2 = global i8 addrspace(1)* @a
@a = addrspace(1) global i8 0
; Now test with global IDs instead of global names.
; CHECK: @a3 = global i8 addrspace(1)* @0
; CHECK: @0 = addrspace(1) global i8 0
@a3 = global i8 addrspace(1)* @0
@0 = addrspace(1) global i8 0