aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/ExtractGV.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2012-07-09 10:52:46 -0700
committerDerek Schuff <dschuff@chromium.org>2012-07-09 11:00:37 -0700
commit5dbcc7e0c9c12f4a4042fb4a226654aee927999c (patch)
treeb316a3370e9286cb4e6f81b2f9d8bd8b54ce5123 /lib/Transforms/IPO/ExtractGV.cpp
parent86dc97be9ac3b4804528e087b04b4f4192cdee54 (diff)
LOCALMODs from hg 0b098ca44de7 against r158408 (hg 90a87d6bfe45)
(only non-new files; new files in git 4f429c8b) Change-Id: Ia39f818088485bd90e4d048db404f8d6ba5f836b
Diffstat (limited to 'lib/Transforms/IPO/ExtractGV.cpp')
-rw-r--r--lib/Transforms/IPO/ExtractGV.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/ExtractGV.cpp b/lib/Transforms/IPO/ExtractGV.cpp
index d9911bfb45..51d0a002e1 100644
--- a/lib/Transforms/IPO/ExtractGV.cpp
+++ b/lib/Transforms/IPO/ExtractGV.cpp
@@ -58,6 +58,15 @@ namespace {
continue;
if (I->getName() == "llvm.global_ctors")
continue;
+ // @LOCALMOD-BEGIN - this is likely upstreamable
+ // Note: there will likely be more cases once this
+ // is exercises more thorougly.
+ if (I->getName() == "llvm.global_dtors")
+ continue;
+ // not observed yet
+ if (I->hasExternalWeakLinkage())
+ continue;
+ // @LOCALMOD-END
}
if (I->hasLocalLinkage())
@@ -72,8 +81,15 @@ namespace {
} else {
if (I->hasAvailableExternallyLinkage())
continue;
- }
-
+ // @LOCALMOD-BEGIN - this is likely upstreamable
+ // Note: there will likely be more cases once this
+ // is exercises more thorougly.
+ // observed for pthread_cancel
+ if (I->hasExternalWeakLinkage())
+ continue;
+ // @LOCALMOD-END
+ }
+
if (I->hasLocalLinkage())
I->setVisibility(GlobalValue::HiddenVisibility);
I->setLinkage(GlobalValue::ExternalLinkage);