mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 04:09:45 +00:00
b80c5f51a4
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246788 91177308-0d34-0410-b5e6-96231b3b80d8
19 lines
482 B
LLVM
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
|
|
|