summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-04-02 05:28:10 +0000
committerLang Hames <lhames@gmail.com>2015-04-02 05:28:10 +0000
commit2f50744fe723b48389ed1f30e8f3e73217a66f9e (patch)
tree22a04090cae276d087884d16e832aafba7644578 /llvm/lib/ExecutionEngine
parentb965ac5dc9fb76eef51c75a8689d5dacc8d12d56 (diff)
downloadbcm5719-llvm-2f50744fe723b48389ed1f30e8f3e73217a66f9e.tar.gz
bcm5719-llvm-2f50744fe723b48389ed1f30e8f3e73217a66f9e.zip
[Orc] Fix local-linkage handling in the CompileOnDemand layer.
llvm-svn: 233895
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
index 8cf490f34cb..74766450e8c 100644
--- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
@@ -54,7 +54,7 @@ void partition(Module &M, const ModulePartitionMap &PMap) {
if (KVPair.second.count(&Orig)) {
copyGVInitializer(New, Orig, VMap);
}
- if (New.getLinkage() == GlobalValue::PrivateLinkage) {
+ if (New.hasLocalLinkage()) {
New.setLinkage(GlobalValue::ExternalLinkage);
New.setVisibility(GlobalValue::HiddenVisibility);
}
@@ -64,7 +64,7 @@ void partition(Module &M, const ModulePartitionMap &PMap) {
[&](Function &New, const Function &Orig, ValueToValueMapTy &VMap) {
if (KVPair.second.count(&Orig))
copyFunctionBody(New, Orig, VMap);
- if (New.getLinkage() == GlobalValue::InternalLinkage) {
+ if (New.hasLocalLinkage()) {
New.setLinkage(GlobalValue::ExternalLinkage);
New.setVisibility(GlobalValue::HiddenVisibility);
}
OpenPOWER on IntegriCloud