Convert linkonce* to weak* instead of strong.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 22 Nov 2013 16:14:30 +0000 (16:14 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 22 Nov 2013 16:14:30 +0000 (16:14 +0000)
commita6c0249619351b8cfa54a9e85eb3a3f1421bb315
tree43a6e058eeb9b72c9da5beed9e2ff4d5131e7485
parenta24e7f7d8cc7f1e4e1582cb2f3ef9748d92fd7e4
Convert linkonce* to weak* instead of strong.

Also refactor the logic into a helper function. This is an important improvement
on mingw where the linker complains about mixed weak and strong symbols.
Converting to weak ensures that the symbol is not dropped, but keeps in a
comdat, making the linker happy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195470 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/ExtractGV.cpp
test/Other/extract-linkonce.ll