67 return LS.IPLS.release();
71 return LS.reset(IPLS);
113 OrcCAPIMaterializationUnit(
120 Interface(std::move(InitialSymbolFlags), std::move(InitSymbol))),
121 Name(std::move(
Name)), Ctx(Ctx), Materialize(Materialize),
122 Discard(Discard), Destroy(Destroy) {}
124 ~OrcCAPIMaterializationUnit() {
131 void materialize(std::unique_ptr<MaterializationResponsibility> R)
override {
134 Materialize(Tmp,
wrap(R.release()));
185 for (
size_t I = 0;
I != NumPairs; ++
I) {
196 for (
size_t I = 0;
I != NumPairs; ++
I) {
212 return LookupKind::Static;
214 return LookupKind::DLSym;
221 case LookupKind::Static:
223 case LookupKind::DLSym:
233 return JITDylibLookupFlags::MatchExportedSymbolsOnly;
235 return JITDylibLookupFlags::MatchAllSymbols;
243 case JITDylibLookupFlags::MatchExportedSymbolsOnly:
245 case JITDylibLookupFlags::MatchAllSymbols:
254 return SymbolLookupFlags::RequiredSymbol;
256 return SymbolLookupFlags::WeaklyReferencedSymbol;
263 case SymbolLookupFlags::RequiredSymbol:
265 case SymbolLookupFlags::WeaklyReferencedSymbol:
286 : Dispose(Dispose), Ctx(Ctx), TryToGenerate(TryToGenerate) {}
305 fromJITDylibLookupFlags(JDLookupFlags);
308 std::vector<LLVMOrcCLookupSetElement> CLookupSet;
309 CLookupSet.reserve(LookupSet.
size());
310 for (
auto &KV : LookupSet) {
314 CLookupSet.push_back({
Name, SLF});
318 auto Err =
unwrap(TryToGenerate(
::wrap(
this), Ctx, &LSR, CLookupKind,
319 ::wrap(&JD), CJDLookupFlags,
320 CLookupSet.data(), CLookupSet.size()));
340 unwrap(ES)->setErrorReporter(
341 [=](
Error Err) { ReportError(Ctx,
wrap(std::move(Err))); });
347 unwrap(ES)->getExecutorProcessControl().getSymbolStringPool().
get());
351 unwrap(SSP)->clearDeadEntries();
365 assert(ES &&
"ES cannot be null");
366 assert(SearchOrder &&
"SearchOrder cannot be null");
367 assert(Symbols &&
"Symbols cannot be null");
368 assert(HandleResult &&
"HandleResult cannot be null");
371 for (
size_t I = 0;
I != SearchOrderSize; ++
I)
372 SO.push_back({unwrap(SearchOrder[I].JD),
373 toJITDylibLookupFlags(SearchOrder[I].JDLookupFlags)});
376 for (
size_t I = 0;
I != SymbolsSize; ++
I)
378 toSymbolLookupFlags(Symbols[
I].LookupFlags));
381 toLookupKind(K), SO, std::move(SLS), SymbolState::Ready,
387 wrap(OrcV2CAPIHelper::getRawPoolEntryPtr(KV.first)),
388 fromJITEvaluatedSymbol(KV.second)});
391 HandleResult(
wrap(
Result.takeError()),
nullptr, 0, Ctx);
405 return unwrap(S)->getKey().data();
410 auto RT =
unwrap(JD)->createResourceTracker();
413 return wrap(RT.get());
418 auto RT =
unwrap(JD)->getDefaultResourceTracker();
420 return wrap(RT.get());
440 std::unique_ptr<DefinitionGenerator> TmpDG(
unwrap(DG));
444 std::unique_ptr<MaterializationUnit> TmpMU(
unwrap(MU));
454 for (
size_t I = 0;
I != NumSyms; ++
I)
456 toJITSymbolFlags(Syms[
I].Flags);
460 return wrap(
new OrcCAPIMaterializationUnit(
461 Name, std::move(SFM), std::move(IS), Ctx, Materialize, Discard, Destroy));
466 SymbolMap SM = toSymbolMap(Syms, NumPairs);
476 for (
size_t I = 0;
I != NumPairs; ++
I) {
477 auto pair = CallableAliases[
I];
492 std::unique_ptr<MaterializationResponsibility> TmpMR(
unwrap(MR));
497 return wrap(&
unwrap(MR)->getTargetJITDylib());
503 return wrap(&
unwrap(MR)->getExecutionSession());
509 auto Symbols =
unwrap(MR)->getSymbols();
513 for (
auto const &pair : Symbols) {
515 auto Flags = pair.second;
519 *NumPairs = Symbols.size();
530 auto Sym =
unwrap(MR)->getInitializerSymbol();
538 auto Symbols =
unwrap(MR)->getRequestedSymbols();
543 for (
auto &
Name : Symbols) {
547 *NumSymbols = Symbols.size();
558 SymbolMap SM = toSymbolMap(Symbols, NumPairs);
559 return wrap(
unwrap(MR)->notifyResolved(std::move(SM)));
571 for (
size_t I = 0;
I != NumSyms; ++
I)
573 toJITSymbolFlags(Syms[
I].Flags);
575 return wrap(
unwrap(MR)->defineMaterializing(std::move(SFM)));
581 std::unique_ptr<MaterializationUnit> TmpMU(
unwrap(MU));
590 for (
size_t I = 0;
I != NumSymbols;
I++) {
593 auto OtherMR =
unwrap(MR)->delegate(Syms);
596 return wrap(OtherMR.takeError());
609 unwrap(MR)->addDependencies(Sym, SDM);
617 unwrap(MR)->addDependenciesForAll(SDM);
622 unwrap(MR)->failMaterialization();
628 std::unique_ptr<ThreadSafeModule> TmpTSM(
unwrap(TSM));
630 std::unique_ptr<MaterializationResponsibility>(
unwrap(MR)),
646 return wrap(JD.takeError());
659 std::unique_ptr<MaterializationUnit> TmpMU(
unwrap(MU));
661 if (
auto Err =
unwrap(JD)->define(TmpMU)) {
663 return wrap(std::move(Err));
674 unwrap(JD)->addGenerator(std::unique_ptr<DefinitionGenerator>(
unwrap(DG)));
680 auto DG = std::make_unique<CAPIDefinitionGenerator>(Dispose, Ctx,
F);
681 return wrap(DG.release());
688 LS.continueLookup(
unwrap(Err));
696 "if Filter is null then FilterCtx must also be null");
704 auto ProcessSymsGenerator =
707 if (!ProcessSymsGenerator) {
709 return wrap(ProcessSymsGenerator.takeError());
712 *
Result =
wrap(ProcessSymsGenerator->release());
720 assert(FileName &&
"FileName can not be null");
722 "if Filter is null then FilterCtx must also be null");
730 auto LibrarySymsGenerator =
733 if (!LibrarySymsGenerator) {
735 return wrap(LibrarySymsGenerator.takeError());
738 *
Result =
wrap(LibrarySymsGenerator->release());
744 const char *FileName,
const char *TargetTriple) {
746 assert(FileName &&
"Filename can not be null");
747 assert(ObjLayer &&
"ObjectLayer can not be null");
750 auto TT =
Triple(TargetTriple);
751 auto LibrarySymsGenerator =
753 if (!LibrarySymsGenerator) {
755 return wrap(LibrarySymsGenerator.takeError());
757 *
Result =
wrap(LibrarySymsGenerator->release());
760 auto LibrarySymsGenerator =
762 if (!LibrarySymsGenerator) {
764 return wrap(LibrarySymsGenerator.takeError());
766 *
Result =
wrap(LibrarySymsGenerator->release());
810 return wrap(JTMB.takeError());
822 std::make_unique<JITTargetMachineBuilder>(TemplateTM->getTargetTriple());
825 .setCPU(TemplateTM->getTargetCPU().str())
826 .setRelocationModel(TemplateTM->getRelocationModel())
827 .setCodeModel(TemplateTM->getCodeModel())
828 .setCodeGenOptLevel(TemplateTM->getOptLevel())
829 .setFeatures(TemplateTM->getTargetFeatureString())
830 .setOptions(TemplateTM->Options);
834 return wrap(JTMB.release());
844 auto Tmp =
unwrap(JTMB)->getTargetTriple().str();
845 char *TargetTriple = (
char *)malloc(Tmp.size() + 1);
846 strcpy(TargetTriple, Tmp.c_str());
859 *
unwrap(JD), std::unique_ptr<MemoryBuffer>(
unwrap(ObjBuffer))));
867 std::unique_ptr<MemoryBuffer>(
unwrap(ObjBuffer))));
874 std::unique_ptr<MaterializationResponsibility>(
unwrap(R)),
875 std::unique_ptr<MemoryBuffer>(
unwrap(ObjBuffer)));
892 assert(!TSMRef &&
"TSMRef was not reset to null on error");
895 assert(TSMRef &&
"Transform succeeded, but TSMRef was set to null");
906 ->setTransform([TransformFunction, Ctx](std::unique_ptr<MemoryBuffer> Obj)
907 ->
Expected<std::unique_ptr<MemoryBuffer>> {
909 if (
LLVMErrorRef Err = TransformFunction(Ctx, &ObjBuffer)) {
910 assert(!ObjBuffer &&
"ObjBuffer was not reset to null on error");
913 return std::unique_ptr<MemoryBuffer>(
unwrap(ObjBuffer));
918 const char *IdentifierOverride) {
919 assert(DumpDir &&
"DumpDir should not be null");
920 assert(IdentifierOverride &&
"IdentifierOverride should not be null");
930 std::unique_ptr<MemoryBuffer> OB(
unwrap(*ObjBuffer));
935 *ObjBuffer =
nullptr;
959 auto TTStr = TT.str();
960 return std::unique_ptr<ObjectLayer>(
977 return wrap(J.takeError());
990 return wrap(&
unwrap(J)->getExecutionSession());
998 return unwrap(J)->getTargetTriple().str().c_str();
1002 return unwrap(J)->getDataLayout().getGlobalPrefix();
1008 unwrap(J)->mangleAndIntern(UnmangledName)));
1014 *
unwrap(JD), std::unique_ptr<MemoryBuffer>(
unwrap(ObjBuffer))));
1022 std::unique_ptr<MemoryBuffer>(
unwrap(ObjBuffer))));
1028 std::unique_ptr<ThreadSafeModule> TmpTSM(
unwrap(TSM));
1035 std::unique_ptr<ThreadSafeModule> TmpTSM(
unwrap(TSM));
1037 std::move(*TmpTSM)));
1048 return wrap(Sym.takeError());
1051 *
Result = Sym->getValue();
1056 return wrap(&
unwrap(J)->getObjLinkingLayer());
1061 return wrap(&
unwrap(J)->getObjTransformLayer());
1067 assert(ES &&
"ES must not be null");
1069 *
unwrap(ES), [] {
return std::make_unique<SectionMemoryManager>(); }));
1082 struct MCJITMemoryManagerLikeCallbacks {
1083 MCJITMemoryManagerLikeCallbacks() =
default;
1084 MCJITMemoryManagerLikeCallbacks(
1085 void *CreateContextCtx,
1092 : CreateContextCtx(CreateContextCtx), CreateContext(CreateContext),
1093 NotifyTerminating(NotifyTerminating),
1094 AllocateCodeSection(AllocateCodeSection),
1095 AllocateDataSection(AllocateDataSection),
1096 FinalizeMemory(FinalizeMemory), Destroy(Destroy) {}
1098 MCJITMemoryManagerLikeCallbacks(MCJITMemoryManagerLikeCallbacks &&
Other) {
1108 ~MCJITMemoryManagerLikeCallbacks() {
1109 if (NotifyTerminating)
1110 NotifyTerminating(CreateContextCtx);
1113 void *CreateContextCtx =
nullptr;
1124 MCJITMemoryManagerLikeCallbacksMemMgr(
1125 const MCJITMemoryManagerLikeCallbacks &CBs)
1127 Opaque = CBs.CreateContext(CBs.CreateContextCtx);
1129 ~MCJITMemoryManagerLikeCallbacksMemMgr()
override { CBs.Destroy(Opaque); }
1134 return CBs.AllocateCodeSection(Opaque,
Size, Alignment, SectionID,
1140 bool isReadOnly)
override {
1141 return CBs.AllocateDataSection(Opaque,
Size, Alignment, SectionID,
1146 char *ErrMsgCString =
nullptr;
1147 bool Result = CBs.FinalizeMemory(Opaque, &ErrMsgCString);
1149 "Did not expect an error message if FinalizeMemory succeeded");
1150 if (ErrMsgCString) {
1152 *ErrMsg = ErrMsgCString;
1153 free(ErrMsgCString);
1159 const MCJITMemoryManagerLikeCallbacks &CBs;
1160 void *Opaque =
nullptr;
1163 assert(ES &&
"ES must not be null");
1164 assert(CreateContext &&
"CreateContext must not be null");
1165 assert(NotifyTerminating &&
"NotifyTerminating must not be null");
1166 assert(AllocateCodeSection &&
"AllocateCodeSection must not be null");
1167 assert(AllocateDataSection &&
"AllocateDataSection must not be null");
1168 assert(FinalizeMemory &&
"FinalizeMemory must not be null");
1169 assert(Destroy &&
"Destroy must not be null");
1171 MCJITMemoryManagerLikeCallbacks CBs(
1172 CreateContextCtx, CreateContext, NotifyTerminating, AllocateCodeSection,
1173 AllocateDataSection, FinalizeMemory, Destroy);
1176 return std::make_unique<MCJITMemoryManagerLikeCallbacksMemMgr>(CBs);
1185 assert(RTDyldObjLinkingLayer &&
"RTDyldObjLinkingLayer must not be null");
1186 assert(Listener &&
"Listener must not be null");
1188 ->registerJITEventListener(*
unwrap(Listener));
1192 return wrap(&
unwrap(J)->getIRTransformLayer());
1196 return unwrap(J)->getDataLayout().getStringRepresentation().c_str();
1206 std::unique_ptr<IndirectStubsManager> TmpISM(
unwrap(ISM));
1214 *
unwrap(ES), ErrorHandlerAddr);
1217 return wrap(LCTM.takeError());
1224 std::unique_ptr<LazyCallThroughManager> TmpLCM(
unwrap(LCM));
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
static void clear(coro::Shape &Shape)
std::optional< std::vector< StOtherPiece > > Other
LLVM_C_EXTERN_C_BEGIN typedef void *(* LLVMMemoryManagerCreateContextCallback)(void *CtxCtx)
void(* LLVMMemoryManagerNotifyTerminatingCallback)(void *CtxCtx)
LLVMErrorRef LLVMOrcLLJITAddObjectFileWithRT(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcResourceTrackerRef RT, LLVMMemoryBufferRef ObjBuffer)
const char LLVMTargetMachineRef TM
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Represents a symbol that has been evaluated to an address already.
JITSymbolFlags getFlags() const
Return the flags for this symbol.
JITTargetAddress getAddress() const
Return the address of this symbol.
Flags for symbols in the JIT.
TargetFlagsType & getTargetFlags()
Return a reference to the target-specific flags.
@ MaterializationSideEffectsOnly
A Module instance is used to store all the information related to an LLVM module.
virtual uint8_t * allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName, bool IsReadOnly)=0
Allocate a memory block of (at least) the given size suitable for data.
virtual uint8_t * allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName)=0
Allocate a memory block of (at least) the given size suitable for executable code.
virtual bool finalizeMemory(std::string *ErrMsg=nullptr)=0
This method is called when object loading is complete and section page permissions can be applied.
void push_back(const T &Elt)
pointer data()
Return a pointer to the vector's buffer, even if empty().
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
StringRef - Represent a constant reference to a string, i.e.
Primary interface to the complete machine description for the target machine.
Triple - Helper class for working with autoconf configuration names.
std::pair< iterator, bool > insert(const ValueT &V)
Error tryToGenerate(LookupState &LS, LookupKind K, JITDylib &JD, JITDylibLookupFlags JDLookupFlags, const SymbolLookupSet &LookupSet) override
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib.
CAPIDefinitionGenerator(LLVMOrcDisposeCAPIDefinitionGeneratorFunction Dispose, void *Ctx, LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction TryToGenerate)
~CAPIDefinitionGenerator()
Definition generators can be attached to JITDylibs to generate new definitions for otherwise unresolv...
A function object that can be used as an ObjectTransformLayer transform to dump object files to disk ...
static Expected< std::unique_ptr< DynamicLibrarySearchGenerator > > GetForCurrentProcess(char GlobalPrefix, SymbolPredicate Allow=SymbolPredicate())
Creates a DynamicLibrarySearchGenerator that searches for symbols in the current process.
std::function< bool(const SymbolStringPtr &)> SymbolPredicate
static Expected< std::unique_ptr< DynamicLibrarySearchGenerator > > Load(const char *FileName, char GlobalPrefix, SymbolPredicate Allow=SymbolPredicate())
Permanently loads the library at the given path and, on success, returns a DynamicLibrarySearchGenera...
An ExecutionSession represents a running JIT program.
Interface for layers that accept LLVM IR.
Base class for managing collections of named indirect stubs.
Represents a JIT'd dynamic library.
A utility class for building TargetMachines for JITs.
static Expected< JITTargetMachineBuilder > detectHost()
Create a JITTargetMachineBuilder for the host system.
Constructs LLJIT instances.
A pre-fabricated ORC JIT stack that can serve as an alternative to MCJIT.
Manages a set of 'lazy call-through' trampolines.
Wraps state for a lookup-in-progress.
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
A MaterializationUnit represents a set of symbol definitions that can be materialized as a group,...
virtual StringRef getName() const =0
Return the name of this materialization unit.
virtual void materialize(std::unique_ptr< MaterializationResponsibility > R)=0
Implementations of this method should materialize all symbols in the materialzation unit,...
Interface for Layers that accept object files.
static PoolEntryPtr getRawPoolEntryPtr(const SymbolStringPtr &S)
static SymbolStringPtr moveToSymbolStringPtr(PoolEntryPtr P)
static void releasePoolEntry(PoolEntryPtr P)
static InProgressLookupState * extractLookupState(LookupState &LS)
static PoolEntryPtr moveFromSymbolStringPtr(SymbolStringPtr S)
static void retainPoolEntry(PoolEntryPtr P)
static void resetLookupState(LookupState &LS, InProgressLookupState *IPLS)
static SymbolStringPtr copyToSymbolStringPtr(PoolEntryPtr P)
API to remove / transfer ownership of JIT resources.
void transferTo(ResourceTracker &DstRT)
Transfer all resources associated with this key to the given tracker, which must target the same JITD...
Error remove()
Remove all resources associated with this key.
static Expected< std::unique_ptr< StaticLibraryDefinitionGenerator > > Load(ObjectLayer &L, const char *FileName, GetObjectFileInterface GetObjFileInterface=GetObjectFileInterface())
Try to create a StaticLibraryDefinitionGenerator from the given path.
A set of symbols to look up, each associated with a SymbolLookupFlags value.
UnderlyingVector::size_type size() const
SymbolLookupSet & add(SymbolStringPtr Name, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol)
Add an element to the set.
String pool for symbol names used by the JIT.
SymbolStringPool::PoolMapEntry PoolEntry
Pointer to a pooled string representing a symbol name.
An LLVMContext together with an associated mutex that can be used to lock the context to prevent conc...
An LLVM Module together with a shared ThreadSafeContext.
struct LLVMOpaqueError * LLVMErrorRef
Opaque reference to an error instance.
LLVMErrorRef LLVMOrcLLJITAddObjectFile(LLVMOrcLLJITRef J, LLVMOrcJITDylibRef JD, LLVMMemoryBufferRef ObjBuffer)
Add a buffer representing an object file to the given JITDylib in the given LLJIT instance.
LLVMErrorRef LLVMOrcLLJITAddLLVMIRModuleWithRT(LLVMOrcLLJITRef J, LLVMOrcResourceTrackerRef RT, LLVMOrcThreadSafeModuleRef TSM)
Add an IR module to the given ResourceTracker's JITDylib in the given LLJIT instance.
struct LLVMOrcOpaqueLLJIT * LLVMOrcLLJITRef
A reference to an orc::LLJIT instance.
LLVMOrcObjectLayerRef(* LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction)(void *Ctx, LLVMOrcExecutionSessionRef ES, const char *Triple)
A function for constructing an ObjectLinkingLayer instance to be used by an LLJIT instance.
void LLVMOrcLLJITBuilderSetJITTargetMachineBuilder(LLVMOrcLLJITBuilderRef Builder, LLVMOrcJITTargetMachineBuilderRef JTMB)
Set the JITTargetMachineBuilder to be used when constructing the LLJIT instance.
LLVMErrorRef LLVMOrcDisposeLLJIT(LLVMOrcLLJITRef J)
Dispose of an LLJIT instance.
LLVMOrcObjectLayerRef LLVMOrcLLJITGetObjLinkingLayer(LLVMOrcLLJITRef J)
Returns a non-owning reference to the LLJIT instance's object linking layer.
LLVMErrorRef LLVMOrcLLJITAddLLVMIRModule(LLVMOrcLLJITRef J, LLVMOrcJITDylibRef JD, LLVMOrcThreadSafeModuleRef TSM)
Add an IR module to the given JITDylib in the given LLJIT instance.
LLVMOrcSymbolStringPoolEntryRef LLVMOrcLLJITMangleAndIntern(LLVMOrcLLJITRef J, const char *UnmangledName)
Mangles the given string according to the LLJIT instance's DataLayout, then interns the result in the...
LLVMOrcJITDylibRef LLVMOrcLLJITGetMainJITDylib(LLVMOrcLLJITRef J)
Return a reference to the Main JITDylib.
struct LLVMOrcOpaqueLLJITBuilder * LLVMOrcLLJITBuilderRef
A reference to an orc::LLJITBuilder instance.
void LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(LLVMOrcLLJITBuilderRef Builder, LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction F, void *Ctx)
Set an ObjectLinkingLayer creator function for this LLJIT instance.
LLVMOrcIRTransformLayerRef LLVMOrcLLJITGetIRTransformLayer(LLVMOrcLLJITRef J)
Returns a non-owning reference to the LLJIT instance's IR transform layer.
const char * LLVMOrcLLJITGetTripleString(LLVMOrcLLJITRef J)
Return the target triple for this LLJIT instance.
LLVMOrcLLJITBuilderRef LLVMOrcCreateLLJITBuilder(void)
Create an LLVMOrcLLJITBuilder.
void LLVMOrcDisposeLLJITBuilder(LLVMOrcLLJITBuilderRef Builder)
Dispose of an LLVMOrcLLJITBuilderRef.
LLVMOrcExecutionSessionRef LLVMOrcLLJITGetExecutionSession(LLVMOrcLLJITRef J)
Get a reference to the ExecutionSession for this LLJIT instance.
LLVMOrcObjectTransformLayerRef LLVMOrcLLJITGetObjTransformLayer(LLVMOrcLLJITRef J)
Returns a non-owning reference to the LLJIT instance's object linking layer.
LLVMErrorRef LLVMOrcCreateLLJIT(LLVMOrcLLJITRef *Result, LLVMOrcLLJITBuilderRef Builder)
Create an LLJIT instance from an LLJITBuilder.
char LLVMOrcLLJITGetGlobalPrefix(LLVMOrcLLJITRef J)
Returns the global prefix character according to the LLJIT's DataLayout.
const char * LLVMOrcLLJITGetDataLayoutStr(LLVMOrcLLJITRef J)
Get the LLJIT instance's default data layout string.
LLVMErrorRef LLVMOrcLLJITLookup(LLVMOrcLLJITRef J, LLVMOrcJITTargetAddress *Result, const char *Name)
Look up the given symbol in the main JITDylib of the given LLJIT instance.
LLVMOrcObjectLayerRef LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(LLVMOrcExecutionSessionRef ES, void *CreateContextCtx, LLVMMemoryManagerCreateContextCallback CreateContext, LLVMMemoryManagerNotifyTerminatingCallback NotifyTerminating, LLVMMemoryManagerAllocateCodeSectionCallback AllocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory, LLVMMemoryManagerDestroyCallback Destroy)
Create a RTDyldObjectLinkingLayer instance using MCJIT-memory-manager-like callbacks.
LLVMOrcObjectLayerRef LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(LLVMOrcExecutionSessionRef ES)
Create a RTDyldObjectLinkingLayer instance using the standard SectionMemoryManager for memory managem...
void LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(LLVMOrcObjectLayerRef RTDyldObjLinkingLayer, LLVMJITEventListenerRef Listener)
Add the given listener to the given RTDyldObjectLinkingLayer.
uint64_t LLVMOrcJITTargetAddress
Represents an address in the executor process.
void LLVMOrcDisposeMaterializationResponsibility(LLVMOrcMaterializationResponsibilityRef MR)
Disposes of the passed MaterializationResponsibility object.
LLVMErrorRef(* LLVMOrcGenericIRModuleOperationFunction)(void *Ctx, LLVMModuleRef M)
A function for inspecting/mutating IR modules, suitable for use with LLVMOrcThreadSafeModuleWithModul...
LLVMOrcSymbolStringPoolRef LLVMOrcExecutionSessionGetSymbolStringPool(LLVMOrcExecutionSessionRef ES)
Return a reference to the SymbolStringPool for an ExecutionSession.
void LLVMOrcSymbolStringPoolClearDeadEntries(LLVMOrcSymbolStringPoolRef SSP)
Clear all unreferenced symbol string pool entries.
LLVMOrcLookupKind
Lookup kind.
void LLVMOrcDisposeCSymbolFlagsMap(LLVMOrcCSymbolFlagsMapPairs Pairs)
Disposes of the passed LLVMOrcCSymbolFlagsMap.
LLVMOrcSymbolStringPoolEntryRef * LLVMOrcMaterializationResponsibilityGetRequestedSymbols(LLVMOrcMaterializationResponsibilityRef MR, size_t *NumSymbols)
Returns the names of any symbols covered by this MaterializationResponsibility object that have queri...
LLVMOrcJITDylibRef LLVMOrcMaterializationResponsibilityGetTargetDylib(LLVMOrcMaterializationResponsibilityRef MR)
Returns the target JITDylib that these symbols are being materialized into.
LLVMOrcCSymbolFlagsMapPairs LLVMOrcMaterializationResponsibilityGetSymbols(LLVMOrcMaterializationResponsibilityRef MR, size_t *NumPairs)
Returns the symbol flags map for this responsibility instance.
LLVMErrorRef LLVMOrcCreateLocalLazyCallThroughManager(const char *TargetTriple, LLVMOrcExecutionSessionRef ES, LLVMOrcJITTargetAddress ErrorHandlerAddr, LLVMOrcLazyCallThroughManagerRef *Result)
void LLVMOrcDisposeMaterializationUnit(LLVMOrcMaterializationUnitRef MU)
Dispose of a MaterializationUnit.
LLVMErrorRef LLVMOrcThreadSafeModuleWithModuleDo(LLVMOrcThreadSafeModuleRef TSM, LLVMOrcGenericIRModuleOperationFunction F, void *Ctx)
Apply the given function to the module contained in this ThreadSafeModule.
LLVMOrcMaterializationUnitRef LLVMOrcCreateCustomMaterializationUnit(const char *Name, void *Ctx, LLVMOrcCSymbolFlagsMapPairs Syms, size_t NumSyms, LLVMOrcSymbolStringPoolEntryRef InitSym, LLVMOrcMaterializationUnitMaterializeFunction Materialize, LLVMOrcMaterializationUnitDiscardFunction Discard, LLVMOrcMaterializationUnitDestroyFunction Destroy)
Create a custom MaterializationUnit.
struct LLVMOrcOpaqueObjectTransformLayer * LLVMOrcObjectTransformLayerRef
A reference to an orc::ObjectTransformLayer instance.
LLVMOrcExecutionSessionRef LLVMOrcMaterializationResponsibilityGetExecutionSession(LLVMOrcMaterializationResponsibilityRef MR)
Returns the ExecutionSession for this MaterializationResponsibility.
void LLVMOrcIRTransformLayerEmit(LLVMOrcIRTransformLayerRef IRLayer, LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcThreadSafeModuleRef TSM)
LLVMErrorRef LLVMOrcMaterializationResponsibilityReplace(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcMaterializationUnitRef MU)
Transfers responsibility to the given MaterializationUnit for all symbols defined by that Materializa...
LLVMOrcResourceTrackerRef LLVMOrcJITDylibCreateResourceTracker(LLVMOrcJITDylibRef JD)
Return a reference to a newly created resource tracker associated with JD.
LLVMErrorRef(* LLVMOrcObjectTransformLayerTransformFunction)(void *Ctx, LLVMMemoryBufferRef *ObjInOut)
A function for applying transformations to an object file buffer.
LLVMOrcMaterializationUnitRef LLVMOrcAbsoluteSymbols(LLVMOrcCSymbolMapPairs Syms, size_t NumPairs)
Create a MaterializationUnit to define the given symbols as pointing to the corresponding raw address...
LLVMOrcThreadSafeModuleRef LLVMOrcCreateNewThreadSafeModule(LLVMModuleRef M, LLVMOrcThreadSafeContextRef TSCtx)
Create a ThreadSafeModule wrapper around the given LLVM module.
LLVMErrorRef LLVMOrcResourceTrackerRemove(LLVMOrcResourceTrackerRef RT)
Remove all resources associated with the given tracker.
void LLVMOrcDisposeObjectLayer(LLVMOrcObjectLayerRef ObjLayer)
Dispose of an ObjectLayer.
void LLVMOrcDisposeThreadSafeModule(LLVMOrcThreadSafeModuleRef TSM)
Dispose of a ThreadSafeModule.
void LLVMOrcObjectTransformLayerSetTransform(LLVMOrcObjectTransformLayerRef ObjTransformLayer, LLVMOrcObjectTransformLayerTransformFunction TransformFunction, void *Ctx)
Set the transform function on an LLVMOrcObjectTransformLayer.
void LLVMOrcMaterializationResponsibilityAddDependenciesForAll(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcCDependenceMapPairs Dependencies, size_t NumPairs)
Adds dependencies to all symbols that the MaterializationResponsibility is responsible for.
struct LLVMOrcOpaqueJITTargetMachineBuilder * LLVMOrcJITTargetMachineBuilderRef
A reference to an orc::JITTargetMachineBuilder instance.
void LLVMOrcExecutionSessionLookup(LLVMOrcExecutionSessionRef ES, LLVMOrcLookupKind K, LLVMOrcCJITDylibSearchOrder SearchOrder, size_t SearchOrderSize, LLVMOrcCLookupSet Symbols, size_t SymbolsSize, LLVMOrcExecutionSessionLookupHandleResultFunction HandleResult, void *Ctx)
Look up symbols in an execution session.
void LLVMOrcDisposeDefinitionGenerator(LLVMOrcDefinitionGeneratorRef DG)
Dispose of a JITDylib::DefinitionGenerator.
void(* LLVMOrcErrorReporterFunction)(void *Ctx, LLVMErrorRef Err)
Error reporter function.
LLVMErrorRef LLVMOrcJITTargetMachineBuilderDetectHost(LLVMOrcJITTargetMachineBuilderRef *Result)
Create a JITTargetMachineBuilder by detecting the host.
struct LLVMOrcOpaqueMaterializationResponsibility * LLVMOrcMaterializationResponsibilityRef
A reference to a uniquely owned orc::MaterializationResponsibility instance.
LLVMErrorRef LLVMOrcMaterializationResponsibilityNotifyEmitted(LLVMOrcMaterializationResponsibilityRef MR)
Notifies the target JITDylib (and any pending queries on that JITDylib) that all symbols covered by t...
void(* LLVMOrcDisposeCAPIDefinitionGeneratorFunction)(void *Ctx)
Disposer for a custom generator.
struct LLVMOrcOpaqueThreadSafeModule * LLVMOrcThreadSafeModuleRef
A reference to an orc::ThreadSafeModule instance.
LLVMOrcResourceTrackerRef LLVMOrcJITDylibGetDefaultResourceTracker(LLVMOrcJITDylibRef JD)
Return a reference to the default resource tracker for the given JITDylib.
struct LLVMOrcOpaqueExecutionSession * LLVMOrcExecutionSessionRef
A reference to an orc::ExecutionSession instance.
LLVMOrcSymbolStringPoolEntryRef LLVMOrcMaterializationResponsibilityGetInitializerSymbol(LLVMOrcMaterializationResponsibilityRef MR)
Returns the initialization pseudo-symbol, if any.
struct LLVMOrcOpaqueIndirectStubsManager * LLVMOrcIndirectStubsManagerRef
A reference to an orc::IndirectStubsManager instance.
void(* LLVMOrcExecutionSessionLookupHandleResultFunction)(LLVMErrorRef Err, LLVMOrcCSymbolMapPairs Result, size_t NumPairs, void *Ctx)
Callback type for ExecutionSession lookups.
LLVMErrorRef LLVMOrcCreateDynamicLibrarySearchGeneratorForPath(LLVMOrcDefinitionGeneratorRef *Result, const char *FileName, char GlobalPrefix, LLVMOrcSymbolPredicate Filter, void *FilterCtx)
Get a LLVMOrcCreateDynamicLibararySearchGeneratorForPath that will reflect library symbols into the J...
void LLVMOrcLookupStateContinueLookup(LLVMOrcLookupStateRef S, LLVMErrorRef Err)
Continue a lookup that was suspended in a generator (see LLVMOrcCAPIDefinitionGeneratorTryToGenerateF...
LLVMErrorRef(* LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction)(LLVMOrcDefinitionGeneratorRef GeneratorObj, void *Ctx, LLVMOrcLookupStateRef *LookupState, LLVMOrcLookupKind Kind, LLVMOrcJITDylibRef JD, LLVMOrcJITDylibLookupFlags JDLookupFlags, LLVMOrcCLookupSet LookupSet, size_t LookupSetSize)
A custom generator function.
void LLVMOrcReleaseResourceTracker(LLVMOrcResourceTrackerRef RT)
Reduces the ref-count of a ResourceTracker.
void LLVMOrcDisposeThreadSafeContext(LLVMOrcThreadSafeContextRef TSCtx)
Dispose of a ThreadSafeContext.
LLVMErrorRef(* LLVMOrcIRTransformLayerTransformFunction)(void *Ctx, LLVMOrcThreadSafeModuleRef *ModInOut, LLVMOrcMaterializationResponsibilityRef MR)
A function for applying transformations as part of an transform layer.
struct LLVMOrcOpaqueSymbolStringPool * LLVMOrcSymbolStringPoolRef
A reference to an orc::SymbolStringPool.
void(* LLVMOrcMaterializationUnitDestroyFunction)(void *Ctx)
A MaterializationUnit destruction callback.
LLVMOrcDumpObjectsRef LLVMOrcCreateDumpObjects(const char *DumpDir, const char *IdentifierOverride)
Create a DumpObjects instance.
struct LLVMOrcOpaqueResourceTracker * LLVMOrcResourceTrackerRef
A reference to an orc::ResourceTracker instance.
void LLVMOrcObjectLayerEmit(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcMaterializationResponsibilityRef R, LLVMMemoryBufferRef ObjBuffer)
Emit an object buffer to an ObjectLayer.
void LLVMOrcExecutionSessionSetErrorReporter(LLVMOrcExecutionSessionRef ES, LLVMOrcErrorReporterFunction ReportError, void *Ctx)
Attach a custom error reporter function to the ExecutionSession.
void LLVMOrcRetainSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S)
Increments the ref-count for a SymbolStringPool entry.
LLVMErrorRef LLVMOrcMaterializationResponsibilityDelegate(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcSymbolStringPoolEntryRef *Symbols, size_t NumSymbols, LLVMOrcMaterializationResponsibilityRef *Result)
Delegates responsibility for the given symbols to the returned materialization responsibility.
LLVMErrorRef LLVMOrcDumpObjects_CallOperator(LLVMOrcDumpObjectsRef DumpObjects, LLVMMemoryBufferRef *ObjBuffer)
Dump the contents of the given MemoryBuffer.
LLVMErrorRef LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(LLVMOrcDefinitionGeneratorRef *Result, char GlobalPrefix, LLVMOrcSymbolPredicate Filter, void *FilterCtx)
Get a DynamicLibrarySearchGenerator that will reflect process symbols into the JITDylib.
LLVMOrcIndirectStubsManagerRef LLVMOrcCreateLocalIndirectStubsManager(const char *TargetTriple)
Create a LocalIndirectStubsManager from the given target triple.
void LLVMOrcJITTargetMachineBuilderSetTargetTriple(LLVMOrcJITTargetMachineBuilderRef JTMB, const char *TargetTriple)
Sets the target triple for the given JITTargetMachineBuilder to the given string.
void LLVMOrcJITDylibAddGenerator(LLVMOrcJITDylibRef JD, LLVMOrcDefinitionGeneratorRef DG)
Add a DefinitionGenerator to the given JITDylib.
LLVMOrcJITTargetMachineBuilderRef LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine(LLVMTargetMachineRef TM)
Create a JITTargetMachineBuilder from the given TargetMachine template.
LLVMOrcJITDylibRef LLVMOrcExecutionSessionGetJITDylibByName(LLVMOrcExecutionSessionRef ES, const char *Name)
Returns the JITDylib with the given name, or NULL if no such JITDylib exists.
const char * LLVMOrcSymbolStringPoolEntryStr(LLVMOrcSymbolStringPoolEntryRef S)
Return the c-string for the given symbol.
LLVMErrorRef LLVMOrcJITDylibDefine(LLVMOrcJITDylibRef JD, LLVMOrcMaterializationUnitRef MU)
Add the given MaterializationUnit to the given JITDylib.
struct LLVMOrcOpaqueObjectLayer * LLVMOrcObjectLayerRef
A reference to an orc::ObjectLayer instance.
void LLVMOrcMaterializationResponsibilityFailMaterialization(LLVMOrcMaterializationResponsibilityRef MR)
Notify all not-yet-emitted covered by this MaterializationResponsibility instance that an error has o...
LLVMOrcThreadSafeContextRef LLVMOrcCreateNewThreadSafeContext(void)
Create a ThreadSafeContext containing a new LLVMContext.
int(* LLVMOrcSymbolPredicate)(void *Ctx, LLVMOrcSymbolStringPoolEntryRef Sym)
Predicate function for SymbolStringPoolEntries.
struct LLVMOrcOpaqueDefinitionGenerator * LLVMOrcDefinitionGeneratorRef
A reference to an orc::DefinitionGenerator.
struct LLVMOrcOpaqueSymbolStringPoolEntry * LLVMOrcSymbolStringPoolEntryRef
A reference to an orc::SymbolStringPool table entry.
struct LLVMOrcOpaqueLazyCallThroughManager * LLVMOrcLazyCallThroughManagerRef
A reference to an orc::LazyCallThroughManager instance.
LLVMOrcSymbolLookupFlags
Symbol lookup flags for lookup sets.
LLVMOrcSymbolStringPoolEntryRef LLVMOrcExecutionSessionIntern(LLVMOrcExecutionSessionRef ES, const char *Name)
Intern a string in the ExecutionSession's SymbolStringPool and return a reference to it.
void LLVMOrcDisposeIndirectStubsManager(LLVMOrcIndirectStubsManagerRef ISM)
Dispose of an IndirectStubsManager.
LLVMErrorRef LLVMOrcMaterializationResponsibilityDefineMaterializing(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcCSymbolFlagsMapPairs Syms, size_t NumSyms)
Attempt to claim responsibility for new definitions.
LLVMErrorRef LLVMOrcObjectLayerAddObjectFile(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcJITDylibRef JD, LLVMMemoryBufferRef ObjBuffer)
Add an object to an ObjectLayer to the given JITDylib.
LLVMErrorRef LLVMOrcMaterializationResponsibilityNotifyResolved(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcCSymbolMapPairs Symbols, size_t NumPairs)
Notifies the target JITDylib that the given symbols have been resolved.
void(* LLVMOrcMaterializationUnitDiscardFunction)(void *Ctx, LLVMOrcJITDylibRef JD, LLVMOrcSymbolStringPoolEntryRef Symbol)
A MaterializationUnit discard callback.
void(* LLVMOrcMaterializationUnitMaterializeFunction)(void *Ctx, LLVMOrcMaterializationResponsibilityRef MR)
A MaterializationUnit materialize callback.
void LLVMOrcDisposeDumpObjects(LLVMOrcDumpObjectsRef DumpObjects)
Dispose of a DumpObjects instance.
char * LLVMOrcJITTargetMachineBuilderGetTargetTriple(LLVMOrcJITTargetMachineBuilderRef JTMB)
Returns the target triple for the given JITTargetMachineBuilder as a string.
struct LLVMOrcOpaqueDumpObjects * LLVMOrcDumpObjectsRef
A reference to an orc::DumpObjects object.
LLVMErrorRef LLVMOrcJITDylibClear(LLVMOrcJITDylibRef JD)
Calls remove on all trackers associated with this JITDylib, see JITDylib::clear().
void LLVMOrcDisposeLazyCallThroughManager(LLVMOrcLazyCallThroughManagerRef LCM)
Dispose of an LazyCallThroughManager.
LLVMOrcJITDylibRef LLVMOrcExecutionSessionCreateBareJITDylib(LLVMOrcExecutionSessionRef ES, const char *Name)
Create a "bare" JITDylib.
struct LLVMOrcOpaqueIRTransformLayer * LLVMOrcIRTransformLayerRef
A reference to an orc::IRTransformLayer instance.
struct LLVMOrcOpaqueLookupState * LLVMOrcLookupStateRef
An opaque lookup state object.
void LLVMOrcDisposeSymbols(LLVMOrcSymbolStringPoolEntryRef *Symbols)
Disposes of the passed LLVMOrcSymbolStringPoolEntryRef* .
void LLVMOrcMaterializationResponsibilityAddDependencies(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcSymbolStringPoolEntryRef Name, LLVMOrcCDependenceMapPairs Dependencies, size_t NumPairs)
Adds dependencies to a symbol that the MaterializationResponsibility is responsible for.
LLVMOrcDefinitionGeneratorRef LLVMOrcCreateCustomCAPIDefinitionGenerator(LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction F, void *Ctx, LLVMOrcDisposeCAPIDefinitionGeneratorFunction Dispose)
Create a custom generator.
LLVMErrorRef LLVMOrcExecutionSessionCreateJITDylib(LLVMOrcExecutionSessionRef ES, LLVMOrcJITDylibRef *Result, const char *Name)
Create a JITDylib.
LLVMContextRef LLVMOrcThreadSafeContextGetContext(LLVMOrcThreadSafeContextRef TSCtx)
Get a reference to the wrapped LLVMContext.
void LLVMOrcReleaseSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S)
Reduces the ref-count for of a SymbolStringPool entry.
struct LLVMOrcOpaqueMaterializationUnit * LLVMOrcMaterializationUnitRef
A reference to a uniquely owned orc::MaterializationUnit instance.
struct LLVMOrcOpaqueJITDylib * LLVMOrcJITDylibRef
A reference to an orc::JITDylib instance.
struct LLVMOrcOpaqueThreadSafeContext * LLVMOrcThreadSafeContextRef
A reference to an orc::ThreadSafeContext instance.
void LLVMOrcIRTransformLayerSetTransform(LLVMOrcIRTransformLayerRef IRTransformLayer, LLVMOrcIRTransformLayerTransformFunction TransformFunction, void *Ctx)
Set the transform function of the provided transform layer, passing through a pointer to user provide...
LLVMOrcJITDylibLookupFlags
JITDylib lookup flags.
LLVMErrorRef LLVMOrcCreateStaticLibrarySearchGeneratorForPath(LLVMOrcDefinitionGeneratorRef *Result, LLVMOrcObjectLayerRef ObjLayer, const char *FileName, const char *TargetTriple)
Get a LLVMOrcCreateStaticLibrarySearchGeneratorForPath that will reflect static library symbols into ...
void LLVMOrcResourceTrackerTransferTo(LLVMOrcResourceTrackerRef SrcRT, LLVMOrcResourceTrackerRef DstRT)
Transfers tracking of all resources associated with resource tracker SrcRT to resource tracker DstRT.
LLVMOrcMaterializationUnitRef LLVMOrcLazyReexports(LLVMOrcLazyCallThroughManagerRef LCTM, LLVMOrcIndirectStubsManagerRef ISM, LLVMOrcJITDylibRef SourceJD, LLVMOrcCSymbolAliasMapPairs CallableAliases, size_t NumPairs)
Create a MaterializationUnit to define lazy re-expots.
void LLVMOrcDisposeJITTargetMachineBuilder(LLVMOrcJITTargetMachineBuilderRef JTMB)
Dispose of a JITTargetMachineBuilder.
@ LLVMOrcLookupKindStatic
@ LLVMJITSymbolGenericFlagsWeak
@ LLVMJITSymbolGenericFlagsExported
@ LLVMJITSymbolGenericFlagsCallable
@ LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly
@ LLVMOrcSymbolLookupFlagsRequiredSymbol
@ LLVMOrcSymbolLookupFlagsWeaklyReferencedSymbol
@ LLVMOrcJITDylibLookupFlagsMatchAllSymbols
@ LLVMOrcJITDylibLookupFlagsMatchExportedSymbolsOnly
void(* LLVMMemoryManagerDestroyCallback)(void *Opaque)
LLVMBool(* LLVMMemoryManagerFinalizeMemoryCallback)(void *Opaque, char **ErrMsg)
uint8_t *(* LLVMMemoryManagerAllocateDataSectionCallback)(void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, const char *SectionName, LLVMBool IsReadOnly)
uint8_t *(* LLVMMemoryManagerAllocateCodeSectionCallback)(void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, const char *SectionName)
struct LLVMOpaqueMemoryBuffer * LLVMMemoryBufferRef
LLVM uses a polymorphic type hierarchy which C cannot represent, therefore parameters must be passed ...
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
struct LLVMOpaqueJITEventListener * LLVMJITEventListenerRef
struct LLVMOpaqueTargetMachine * LLVMTargetMachineRef
void LLVMDisposeTargetMachine(LLVMTargetMachineRef T)
Dispose the LLVMTargetMachineRef instance generated by LLVMCreateTargetMachine.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
std::vector< std::pair< JITDylib *, JITDylibLookupFlags > > JITDylibSearchOrder
A list of (JITDylib*, JITDylibLookupFlags) pairs to be used as a search order during symbol lookup.
std::unique_ptr< AbsoluteSymbolsMaterializationUnit > absoluteSymbols(SymbolMap Symbols)
Create an AbsoluteSymbolsMaterializationUnit with the given symbols.
IntrusiveRefCntPtr< ResourceTracker > ResourceTrackerSP
SymbolLookupFlags
Lookup flags that apply to each symbol in a lookup.
JITDylibLookupFlags
Lookup flags that apply to each dylib in the search order for a lookup.
std::function< std::unique_ptr< IndirectStubsManager >()> createLocalIndirectStubsManagerBuilder(const Triple &T)
Create a local indriect stubs manager builder.
std::unique_ptr< LazyReexportsMaterializationUnit > lazyReexports(LazyCallThroughManager &LCTManager, IndirectStubsManager &ISManager, JITDylib &SourceJD, SymbolAliasMap CallableAliases, ImplSymbolMap *SrcJDLoc=nullptr)
Define lazy-reexports based on the given SymbolAliasMap.
LookupKind
Describes the kind of lookup being performed.
RegisterDependenciesFunction NoDependenciesToRegister
This can be used as the value for a RegisterDependenciesFunction if there are no dependants to regist...
Expected< std::unique_ptr< LazyCallThroughManager > > createLocalLazyCallThroughManager(const Triple &T, ExecutionSession &ES, JITTargetAddress ErrorHandlerAddr)
Create a LocalLazyCallThroughManager from the given triple and execution session.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
LLVM_ATTRIBUTE_RETURNS_NONNULL void * safe_malloc(size_t Sz)
Attribute unwrap(LLVMAttributeRef Attr)
LLVMAttributeRef wrap(Attribute Attr)
void replace(Container &Cont, typename Container::iterator ContIt, typename Container::iterator ContEnd, RandomAccessIterator ValIt, RandomAccessIterator ValEnd)
Given a sequence container Cont, replace the range [ContIt, ContEnd) with the range [ValIt,...
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
Represents an evaluated symbol address and flags.
Represents the linkage flags for a symbol definition.
Represents a pair of a JITDylib and LLVMOrcCSymbolsList.
LLVMOrcCSymbolsList Names
An element type for a JITDylib search order.
An element type for a symbol lookup set.
Represents a pair of a symbol name and SymbolAliasMapEntry.
Represents a pair of a symbol name and LLVMJITSymbolFlags.
Represents a pair of a symbol name and an evaluated symbol.
LLVMOrcSymbolStringPoolEntryRef * Symbols