13#ifndef LLVM_EXECUTIONENGINE_ORC_JITLINKREDIRECABLESYMBOLMANAGER_H
14#define LLVM_EXECUTIONENGINE_ORC_JITLINKREDIRECABLESYMBOLMANAGER_H
34 if (!AnonymousPtrCreator || !PtrJumpStubCreator)
35 return make_error<StringError>(
"Architecture not supported",
37 return std::unique_ptr<RedirectableSymbolManager>(
39 ObjLinkingLayer, AnonymousPtrCreator, PtrJumpStubCreator));
46 : ObjLinkingLayer(ObjLinkingLayer),
47 AnonymousPtrCreator(
std::
move(AnonymousPtrCreator)),
48 PtrJumpStubCreator(
std::
move(PtrJumpStubCreator)) {}
61 std::atomic_size_t StubGraphIdx{0};
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
const Triple & getTargetTriple() const
Return the triple for the executor.
Represents a JIT'd dynamic library.
void emitRedirectableSymbols(std::unique_ptr< MaterializationResponsibility > R, SymbolMap InitialDests) override
Emit redirectable symbol.
ObjectLinkingLayer & getObjectLinkingLayer() const
Error redirect(JITDylib &JD, const SymbolMap &NewDests) override
Change the redirection destination of given symbols to new destination symbols.
static Expected< std::unique_ptr< RedirectableSymbolManager > > Create(ObjectLinkingLayer &ObjLinkingLayer)
Create redirection manager that uses JITLink based implementaion.
JITLinkRedirectableSymbolManager(ObjectLinkingLayer &ObjLinkingLayer, jitlink::AnonymousPointerCreator &AnonymousPtrCreator, jitlink::PointerJumpStubCreator &PtrJumpStubCreator)
ExecutionSession & getExecutionSession()
An ObjectLayer implementation built on JITLink.
Base class for managing redirectable symbols in which a call gets redirected to another symbol in run...
PointerJumpStubCreator getPointerJumpStubCreator(const Triple &TT)
Get target-specific PointerJumpStubCreator.
AnonymousPointerCreator getAnonymousPointerCreator(const Triple &TT)
Get target-specific AnonymousPointerCreator.
This is an optimization pass for GlobalISel generic memory operations.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.