diff options
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index ab9d30d..64cd515 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -1914,12 +1914,6 @@ bool GlobalOpt::ProcessGlobal(GlobalVariable *GV, return true; } - if (GV->hasLinkOnceODRLinkage() && GV->hasUnnamedAddr() && GV->isConstant() && - GV->getVisibility() != GlobalValue::HiddenVisibility) { - GV->setVisibility(GlobalValue::HiddenVisibility); - return true; - } - if (!GV->hasLocalLinkage()) return false; @@ -1932,7 +1926,6 @@ bool GlobalOpt::ProcessGlobal(GlobalVariable *GV, if (!GS.isCompared && !GV->hasUnnamedAddr()) { GV->setUnnamedAddr(true); NumUnnamed++; - return true; } if (GV->isConstant() || !GV->hasInitializer()) @@ -2112,10 +2105,6 @@ bool GlobalOpt::OptimizeFunctions(Module &M) { F->eraseFromParent(); Changed = true; ++NumFnDeleted; - } else if (F->hasLinkOnceODRLinkage() && F->hasUnnamedAddr() && - F->getVisibility() != GlobalValue::HiddenVisibility) { - F->setVisibility(GlobalValue::HiddenVisibility); - Changed = true; } else if (F->hasLocalLinkage()) { if (F->getCallingConv() == CallingConv::C && !F->isVarArg() && !F->hasAddressTaken()) { |