summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-05-05 17:40:44 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-05-05 17:40:44 +0000
commit1789fb6493d42e415b4881e9b6fac569000ec7e4 (patch)
tree868881536d081809d9a659884b40d2c9b962358b /llvm/lib/Transforms/IPO
parent48bc268290952547cc7dc74ce475fe58e6010c41 (diff)
downloadbcm5719-llvm-1789fb6493d42e415b4881e9b6fac569000ec7e4.tar.gz
bcm5719-llvm-1789fb6493d42e415b4881e9b6fac569000ec7e4.zip
LTO: -internalize sets visibility to default
Visibility is meaningless when the linkage is local. Change `-internalize` to reset the visibility to `default`. <rdar://problem/16141113> llvm-svn: 207979
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/Internalize.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp
index cdb85fd525c..c970a1a1c1a 100644
--- a/llvm/lib/Transforms/IPO/Internalize.cpp
+++ b/llvm/lib/Transforms/IPO/Internalize.cpp
@@ -159,6 +159,7 @@ bool InternalizePass::runOnModule(Module &M) {
if (!shouldInternalize(*I, ExternalNames))
continue;
+ I->setVisibility(GlobalValue::DefaultVisibility);
I->setLinkage(GlobalValue::InternalLinkage);
if (ExternalNode)
@@ -195,6 +196,7 @@ bool InternalizePass::runOnModule(Module &M) {
if (!shouldInternalize(*I, ExternalNames))
continue;
+ I->setVisibility(GlobalValue::DefaultVisibility);
I->setLinkage(GlobalValue::InternalLinkage);
Changed = true;
++NumGlobals;
@@ -207,6 +209,7 @@ bool InternalizePass::runOnModule(Module &M) {
if (!shouldInternalize(*I, ExternalNames))
continue;
+ I->setVisibility(GlobalValue::DefaultVisibility);
I->setLinkage(GlobalValue::InternalLinkage);
Changed = true;
++NumAliases;
OpenPOWER on IntegriCloud