If a constant or a function has linkonce_odr linkage and unnamed_addr, mark it
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 25 Jun 2012 14:30:31 +0000 (14:30 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 25 Jun 2012 14:30:31 +0000 (14:30 +0000)
commita0706a9ff4469b137ed6eea3f484a0152bab4c88
tree06c3465b1a53ae509952654d3842b2d59bf80a27
parentccaddf47086742f62fb7fbf97f6509395f31b957
If a constant or a function has linkonce_odr linkage and unnamed_addr, mark it
hidden. Being linkonce_odr guarantees that it is available in every dso that
needs it. Being a constant/function with unnamed_addr guarantees that the
copies don't have to be merged.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159136 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/GlobalValue.h
lib/Transforms/IPO/GlobalOpt.cpp
test/Transforms/GlobalOpt/hidden.ll [new file with mode: 0644]