Refactor duplicated code in liking GlobalValues.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 31 Oct 2014 23:10:07 +0000 (23:10 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 31 Oct 2014 23:10:07 +0000 (23:10 +0000)
commit9f86b432158357c7dbd8ea7e340824b6b4f7a2f2
treeaab54db7f138f1f07e897b5e648891844b3e4c15
parentfc46c683102eaa4682ea0c244974d94366687ffb
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@221014 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp
test/Linker/Inputs/visibility.ll
test/Linker/visibility.ll