Linker: Create a function declaration when moving a non-prevailing alias of function...
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 10 Aug 2017 01:07:44 +0000 (01:07 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 10 Aug 2017 01:07:44 +0000 (01:07 +0000)
commit00f808ffcc36d3f6b903f5dbf09469ed88c6eba3
treeec2ad6bc1a833f467c11b06e723edb85e239d937
parentba69187988ad87aed456608f36febb6f05047370
Linker: Create a function declaration when moving a non-prevailing alias of function type.

We were previously creating a global variable of function type,
which is invalid IR. This issue was exposed by r304690, in which we
started asserting that global variables were of a valid type.

Fixes PR33462.

Differential Revision: https://reviews.llvm.org/D36438

llvm-svn: 310543
llvm/lib/Linker/IRMover.cpp
llvm/test/LTO/Resolution/X86/function-alias-non-prevailing.ll [new file with mode: 0644]