diff options
author | Lang Hames <lhames@gmail.com> | 2015-04-02 05:28:10 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-04-02 05:28:10 +0000 |
commit | 2eb21d024595201b56b0471da50e0801c08f5c8e (patch) | |
tree | 3663897ea45ee05cb31f601af1e6937e9ccb109a /lib | |
parent | 57bea4161b2226d4428922c11529ae322237aef4 (diff) |
[Orc] Fix local-linkage handling in the CompileOnDemand layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExecutionEngine/Orc/IndirectionUtils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/lib/ExecutionEngine/Orc/IndirectionUtils.cpp index 8cf490f34cb..74766450e8c 100644 --- a/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/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); } |