mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
d866898775
On ELF and COFF an alias is just another name for a position in the file. There is no way to refer to a position in another file, so an alias to undefined is meaningless. MachO currently doesn't support aliases. The spec has a N_INDR, which when implemented will have a different set of restrictions. Adding support for it shouldn't be harder than any other IR extension. For now, having the IR represent what is actually possible with current tools makes it easier to fix the design of GlobalAlias. llvm-svn: 203705
13 lines
266 B
LLVM
13 lines
266 B
LLVM
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
|
|
declare void @f()
|
|
@fa = alias void ()* @f
|
|
; CHECK: Alias must point to a definition
|
|
; CHECK-NEXT: @fa
|
|
|
|
@g = external global i32
|
|
@ga = alias i32* @g
|
|
; CHECK: Alias must point to a definition
|
|
; CHECK-NEXT: @ga
|