[llvm-link] Fix for an assertion when linking global with appending linkage
authorSergey Dmitriev <serguei.n.dmitriev@intel.com>
Sat, 23 Jan 2021 03:33:27 +0000 (19:33 -0800)
committerSergey Dmitriev <serguei.n.dmitriev@intel.com>
Sat, 23 Jan 2021 08:10:42 +0000 (00:10 -0800)
commit267a57a64572cffbb74599878bdcc9f3b678ffa3
treee0a8a56ec0b7aef82099286ecab554da3e2e7c6d
parent596d534ac3524052df210be8d3c01a33b2260a42
[llvm-link] Fix for an assertion when linking global with appending linkage

This patch fixes llvm-link assertion when linking external variable
declaration with a definition with appending linkage.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95126
llvm/lib/Linker/IRMover.cpp
llvm/lib/Linker/LinkModules.cpp
llvm/test/Linker/Inputs/appending-global.ll [new file with mode: 0644]
llvm/test/Linker/appending-global-err1.ll [new file with mode: 0644]
llvm/test/Linker/appending-global-err2.ll [new file with mode: 0644]
llvm/test/Linker/appending-global-err3.ll [new file with mode: 0644]
llvm/test/Linker/appending-global-err4.ll [new file with mode: 0644]
llvm/test/Linker/appending-global-err5.ll [new file with mode: 0644]
llvm/test/Linker/appending-global-proto.ll [new file with mode: 0644]