mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user