Linker: Remove unnecessary call to copyMetadata in IRLinker::linkGlobalVariable.
authorPeter Collingbourne <peter@pcc.me.uk>
Mon, 14 Nov 2016 23:18:38 +0000 (23:18 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Mon, 14 Nov 2016 23:18:38 +0000 (23:18 +0000)
commit3cb86272fc4c2c42cce63a978879a4299a8c7bd5
tree411efb41bf7583535ce2174ecae06015b1b0cec1
parent8f21c0e50acb2d81deff8ac8380268f58fb3a77b
Linker: Remove unnecessary call to copyMetadata in IRLinker::linkGlobalVariable.

This was causing us to create duplicate metadata on global variables.
Debug info test case by Adrian Prantl, additional test cases by me.

Fixes PR31012.

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

llvm-svn: 286905
llvm/lib/Linker/IRMover.cpp
llvm/test/Linker/Inputs/metadata-attach.ll [new file with mode: 0644]
llvm/test/Linker/debug-info-global-var.ll [new file with mode: 0644]
llvm/test/Linker/metadata-attach.ll