Lazily link GlobalVariables and GlobalAliases.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 8 Dec 2014 18:45:16 +0000 (18:45 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 8 Dec 2014 18:45:16 +0000 (18:45 +0000)
commitef23711eeefbde2952e71071de329db63ff48297
tree598a06ad3e41545e84d0e78ac0f68a9f4d750c85
parentcc46cd8eecca578d0166cab883f348d05898e541
Lazily link GlobalVariables and GlobalAliases.

We were already lazily linking functions, but all GlobalValues can be treated
uniformly for this.

The test updates are to ensure that a given GlobalValue is still linked in.

This fixes pr21494.

llvm-svn: 223681
llvm/lib/Linker/LinkModules.cpp
llvm/test/LTO/cfi_endproc.ll
llvm/test/LTO/linkonce_odr_func.ll
llvm/test/Linker/Inputs/testlink.ll
llvm/test/Linker/lto-attributes.ll
llvm/test/Linker/pr21494.ll [new file with mode: 0644]
llvm/test/Linker/testlink.ll