mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Reject alias to undefined symbols in the verifier.
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203705 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4,14 +4,16 @@
|
||||
|
||||
@llvm.used = appending global [1 x i8*] [i8* bitcast (i32* @foo1 to i8*)], section "llvm.metadata"
|
||||
|
||||
@bar = external global i32
|
||||
@bar = global i32 0
|
||||
@foo1 = alias i32* @bar
|
||||
@foo2 = alias i32* @bar
|
||||
@foo3 = alias i32* @foo2
|
||||
|
||||
%FunTy = type i32()
|
||||
|
||||
declare i32 @foo_f()
|
||||
define i32 @foo_f() {
|
||||
ret i32 0
|
||||
}
|
||||
@bar_f = alias weak %FunTy* @foo_f
|
||||
@bar_ff = alias i32()* @bar_f
|
||||
|
||||
|
Reference in New Issue
Block a user