Reject alias to undefined symbols in the verifier.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 12 Mar 2014 20:15:49 +0000 (20:15 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 12 Mar 2014 20:15:49 +0000 (20:15 +0000)
commit38048cdb1c016e1429004ddf4adfa40a8d853cbf
tree20868c4f3015e4cc37f7d41e0312d85e50cf2d02
parent4207c6759c040ca9c26fd305b1e62d5c68a44fb1
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
17 files changed:
docs/LangRef.rst
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/IR/Verifier.cpp
test/Analysis/BasicAA/2007-11-05-SizeCrash.ll
test/Analysis/BasicAA/2007-12-08-OutOfBoundsCrash.ll
test/Assembler/2007-09-10-AliasFwdRef.ll
test/CodeGen/X86/2008-03-14-SpillerCrash.ll
test/CodeGen/X86/alias-error.ll [deleted file]
test/Feature/aliases.ll
test/Linker/2011-08-22-ResolveAlias2.ll
test/Transforms/GVN/2009-03-10-PREOnVoid.ll
test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll
test/Transforms/GlobalOpt/alias-resolve.ll
test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll
test/Transforms/InstCombine/2007-09-17-AliasConstFold2.ll
test/Transforms/MetaRenamer/metarenamer.ll
test/Verifier/alias.ll [new file with mode: 0644]