Check isDiscardableIfUnused, rather than hasLocalLinkage, when bumping
authorLang Hames <lhames@gmail.com>
Mon, 4 Mar 2013 22:40:44 +0000 (22:40 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 4 Mar 2013 22:40:44 +0000 (22:40 +0000)
commit880e8c0ad41345f353b819c51092baa8f05e1950
treecc1c3b1b23a1d95e11f0d324c7d2a2d4f20e5502
parent1ae08e007784a0708d6dae9c37b84bb62d5e1282
Check isDiscardableIfUnused, rather than hasLocalLinkage, when bumping
GlobalValue linkage up to ExternalLinkage in the ExtractGV pass. This
prevents linkonce and linkonce_odr symbols from being DCE'd.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176459 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/ExtractGV.cpp
test/Other/extract-linkonce.ll [new file with mode: 0644]