diff options
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp')
| -rw-r--r-- | llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp index 4d207cffd20..5b1eccd82a4 100644 --- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp @@ -19,6 +19,9 @@ namespace llvm { namespace orc { +void JITCompileCallbackManagerBase::anchor() {} +void IndirectStubsManagerBase::anchor() {} + Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) { Constant *AddrIntVal = ConstantInt::get(Type::getInt64Ty(FT.getContext()), Addr); @@ -37,7 +40,7 @@ GlobalVariable* createImplPointer(PointerType &PT, Module &M, return IP; } -void makeStub(Function &F, GlobalVariable &ImplPointer) { +void makeStub(Function &F, Value &ImplPointer) { assert(F.isDeclaration() && "Can't turn a definition into a stub."); assert(F.getParent() && "Function isn't in a module."); Module &M = *F.getParent(); @@ -106,6 +109,9 @@ void makeAllSymbolsExternallyAccessible(Module &M) { for (auto &GV : M.globals()) raiseVisibilityOnValue(GV, Renamer); + + for (auto &A : M.aliases()) + raiseVisibilityOnValue(A, Renamer); } Function* cloneFunctionDecl(Module &Dst, const Function &F, @@ -177,17 +183,14 @@ void moveGlobalVariableInitializer(GlobalVariable &OrigGV, nullptr, Materializer)); } -GlobalAlias* cloneGlobalAlias(Module &Dst, const GlobalAlias &OrigA, - ValueToValueMapTy &VMap, - ValueMaterializer *Materializer) { +GlobalAlias* cloneGlobalAliasDecl(Module &Dst, const GlobalAlias &OrigA, + ValueToValueMapTy &VMap) { assert(OrigA.getAliasee() && "Original alias doesn't have an aliasee?"); auto *NewA = GlobalAlias::create(OrigA.getValueType(), OrigA.getType()->getPointerAddressSpace(), OrigA.getLinkage(), OrigA.getName(), &Dst); NewA->copyAttributesFrom(&OrigA); VMap[&OrigA] = NewA; - NewA->setAliasee(cast<Constant>(MapValue(OrigA.getAliasee(), VMap, RF_None, - nullptr, Materializer))); return NewA; } |

