Revert r221096 bringing back r221014 with a fix.
authorRafael Espindola <rafael.espindola@gmail.com>
Sun, 2 Nov 2014 13:28:57 +0000 (13:28 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sun, 2 Nov 2014 13:28:57 +0000 (13:28 +0000)
commit0a6665ead5089102595e83d337da491b639e5b4d
tree3179b10b21d6c011251b8ebf4a0a6faaacc131b5
parenta0ef0e7d0ce602590c18277ec3483c340366a8a6
Revert r221096 bringing back r221014 with a fix.

The issue was that linkAppendingVarProto does the full linking job, including
deleting the old dst variable. The fix is just to call it and return early
if we have a GV with appending linkage.

original message:

    Refactor duplicated code in liking GlobalValues.

    There is quiet a bit of logic that is common to any GlobalValue but was
    duplicated for Functions, GlobalVariables and GlobalAliases.

    While at it, merge visibility even when comdats are used, fixing pr21415.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221098 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp
test/Linker/Inputs/visibility.ll
test/Linker/visibility.ll