Class LLVMOrc
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContains the function pointers loaded fromLLVMCore.getLibrary(). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intRepresents generic linkage flags for a symbol definition.static final intRepresents generic linkage flags for a symbol definition.static final intRepresents generic linkage flags for a symbol definition.static final intRepresents generic linkage flags for a symbol definition.static final intRepresents generic linkage flags for a symbol definition.static final intJITDyliblookup flags.static final intJITDyliblookup flags.static final intLookup kind.static final intLookup kind.static final intSymbol lookup flags for lookup sets.static final intSymbol lookup flags for lookup sets. -
Method Summary
Modifier and TypeMethodDescriptionstatic longCreate aMaterializationUnitto define the given symbols as pointing to the corresponding raw addresses.static longLLVMOrcCreateCustomCAPIDefinitionGenerator(LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI F, long Ctx, @Nullable LLVMOrcDisposeCAPIDefinitionGeneratorFunctionI Dispose) Create a custom generator.static longLLVMOrcCreateCustomMaterializationUnit(CharSequence Name, long Ctx, LLVMOrcCSymbolFlagsMapPair.Buffer Syms, long InitSym, LLVMOrcMaterializationUnitMaterializeFunctionI Materialize, LLVMOrcMaterializationUnitDiscardFunctionI Discard, LLVMOrcMaterializationUnitDestroyFunctionI Destroy) Create a customMaterializationUnit.static longLLVMOrcCreateCustomMaterializationUnit(ByteBuffer Name, long Ctx, LLVMOrcCSymbolFlagsMapPair.Buffer Syms, long InitSym, LLVMOrcMaterializationUnitMaterializeFunctionI Materialize, LLVMOrcMaterializationUnitDiscardFunctionI Discard, LLVMOrcMaterializationUnitDestroyFunctionI Destroy) Create a customMaterializationUnit.static longLLVMOrcCreateDumpObjects(CharSequence DumpDir, CharSequence IdentifierOverride) Create aDumpObjectsinstance.static longLLVMOrcCreateDumpObjects(ByteBuffer DumpDir, ByteBuffer IdentifierOverride) Create aDumpObjectsinstance.static longLLVMOrcCreateDynamicLibrarySearchGeneratorForPath(org.lwjgl.PointerBuffer Result, CharSequence FileName, byte GlobalPrefix, @Nullable LLVMOrcSymbolPredicateI Filter, long FilterCtx) Get aLLVMOrcCreateDynamicLibrarySearchGeneratorForPaththat will reflect library symbols into theJITDylib.static longLLVMOrcCreateDynamicLibrarySearchGeneratorForPath(org.lwjgl.PointerBuffer Result, ByteBuffer FileName, byte GlobalPrefix, @Nullable LLVMOrcSymbolPredicateI Filter, long FilterCtx) Get aLLVMOrcCreateDynamicLibrarySearchGeneratorForPaththat will reflect library symbols into theJITDylib.static longLLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(org.lwjgl.PointerBuffer Result, byte GlobalPrefx, @Nullable LLVMOrcSymbolPredicateI Filter, long FilterCtx) Get aDynamicLibrarySearchGeneratorthat will reflect process symbols into theJITDylib.static longLLVMOrcCreateLocalIndirectStubsManager(CharSequence TargetTriple) Create aLocalIndirectStubsManagerfrom the given target triple.static longLLVMOrcCreateLocalIndirectStubsManager(ByteBuffer TargetTriple) Create aLocalIndirectStubsManagerfrom the given target triple.static longLLVMOrcCreateLocalLazyCallThroughManager(CharSequence TargetTriple, long ES, long ErrorHandlerAddr, org.lwjgl.PointerBuffer LCTM) static longLLVMOrcCreateLocalLazyCallThroughManager(ByteBuffer TargetTriple, long ES, long ErrorHandlerAddr, org.lwjgl.PointerBuffer LCTM) static longCreate aThreadSafeContextcontaining a newLLVMContext.static longLLVMOrcCreateNewThreadSafeModule(long M, long TSCtx) Create aThreadSafeModulewrapper around the given LLVM module.static longLLVMOrcCreateStaticLibrarySearchGeneratorForPath(org.lwjgl.PointerBuffer Result, long ObjLayer, CharSequence FileName, @Nullable CharSequence TargetTriple) Get aLLVMOrcCreateStaticLibrarySearchGeneratorForPaththat will reflect static library symbols into theJITDylib.static longLLVMOrcCreateStaticLibrarySearchGeneratorForPath(org.lwjgl.PointerBuffer Result, long ObjLayer, ByteBuffer FileName, @Nullable ByteBuffer TargetTriple) Get aLLVMOrcCreateStaticLibrarySearchGeneratorForPaththat will reflect static library symbols into theJITDylib.static voidDisposes of the passedLLVMOrcCSymbolFlagsMap.static voidLLVMOrcDisposeDefinitionGenerator(long DG) Dispose of aJITDylib::DefinitionGenerator.static voidLLVMOrcDisposeDumpObjects(long DumpObjects) Dispose of aDumpObjectsinstance.static voidLLVMOrcDisposeIndirectStubsManager(long ISM) Dispose of anIndirectStubsManager.static voidLLVMOrcDisposeJITTargetMachineBuilder(long JTMB) Dispose of aJITTargetMachineBuilder.static voidLLVMOrcDisposeLazyCallThroughManager(long LCTM) Dispose of anLazyCallThroughManager.static voidDisposes of the passedMaterializationResponsibilityobject.static voidLLVMOrcDisposeMaterializationUnit(long MU) Dispose of aMaterializationUnit.static voidLLVMOrcDisposeObjectLayer(long ObjLayer) Dispose of anObjectLayer.static voidLLVMOrcDisposeSymbols(org.lwjgl.PointerBuffer Symbols) Disposes of the passedLLVMOrcSymbolStringPoolEntryRef*.static voidLLVMOrcDisposeThreadSafeContext(long TSCtx) Dispose of aThreadSafeContext.static voidLLVMOrcDisposeThreadSafeModule(long TSM) Dispose of aThreadSafeModule.static longLLVMOrcDumpObjects_CallOperator(long DumpObjects, org.lwjgl.PointerBuffer ObjBuffer) Dump the contents of the givenMemoryBuffer.static longLLVMOrcExecutionSessionCreateBareJITDylib(long ES, CharSequence Name) Create a "bare"JITDylib.static longLLVMOrcExecutionSessionCreateBareJITDylib(long ES, ByteBuffer Name) Create a "bare"JITDylib.static longLLVMOrcExecutionSessionCreateJITDylib(long ES, org.lwjgl.PointerBuffer Result, CharSequence Name) Create aJITDylib.static longLLVMOrcExecutionSessionCreateJITDylib(long ES, org.lwjgl.PointerBuffer Result, ByteBuffer Name) Create aJITDylib.static longLLVMOrcExecutionSessionGetJITDylibByName(long ES, CharSequence Name) Returns theJITDylibwith the given name, orNULLif no suchJITDylibexists.static longLLVMOrcExecutionSessionGetJITDylibByName(long ES, ByteBuffer Name) Returns theJITDylibwith the given name, orNULLif no suchJITDylibexists.static longReturn a reference to theSymbolStringPoolfor anExecutionSession.static longLLVMOrcExecutionSessionIntern(long ES, CharSequence Name) Intern a string in theExecutionSession'sSymbolStringPooland return a reference to it.static longLLVMOrcExecutionSessionIntern(long ES, ByteBuffer Name) Intern a string in theExecutionSession'sSymbolStringPooland return a reference to it.static voidLLVMOrcExecutionSessionLookup(long ES, int K, @Nullable LLVMOrcCJITDylibSearchOrderElement.Buffer SearchOrder, @Nullable LLVMOrcCLookupSetElement.Buffer Symbols, LLVMOrcExecutionSessionLookupHandleResultFunctionI HandleResult, long Ctx) Look up symbols in an execution session.static voidLLVMOrcExecutionSessionSetErrorReporter(long ES, LLVMOrcErrorReporterFunctionI ReportError, long Ctx) Attach a custom error reporter function to theExecutionSession.static voidLLVMOrcIRTransformLayerEmit(long IRTransformLayer, long MR, long TSM) static voidLLVMOrcIRTransformLayerSetTransform(long IRTransformLayer, LLVMOrcIRTransformLayerTransformFunctionI TransformFunction, long Ctx) Set the transform function of the provided transform layer, passing through a pointer to user provided context.static voidLLVMOrcJITDylibAddGenerator(long JD, long DG) Add aDefinitionGeneratorto the givenJITDylib.static longLLVMOrcJITDylibClear(long JD) Calls remove on all trackers associated with thisJITDylib, seeJITDylib::clear().static longLLVMOrcJITDylibCreateResourceTracker(long JD) Return a reference to a newly created resource tracker associated withJD.static longLLVMOrcJITDylibDefine(long JD, long MU) Add the givenMaterializationUnitto the givenJITDylib.static longReturn a reference to the default resource tracker for the givenJITDylib.static longCreate aJITTargetMachineBuilderfrom the givenTargetMachinetemplate.static longLLVMOrcJITTargetMachineBuilderDetectHost(org.lwjgl.PointerBuffer Result) Create aJITTargetMachineBuilderby detecting the host.static @Nullable StringReturns the target triple for the givenJITTargetMachineBuilderas a string.static voidLLVMOrcJITTargetMachineBuilderSetTargetTriple(long JTMB, CharSequence TargetTriple) Sets the target triple for the givenJITTargetMachineBuilderto the given string.static voidLLVMOrcJITTargetMachineBuilderSetTargetTriple(long JTMB, ByteBuffer TargetTriple) Sets the target triple for the givenJITTargetMachineBuilderto the given string.static longLLVMOrcLazyReexports(long LCTM, long ISM, long SourceRef, LLVMOrcCSymbolAliasMapPair.Buffer CallableAliases) Create aMaterializationUnitto define lazy re-expots.static voidLLVMOrcLookupStateContinueLookup(long S, long Err) Continue a lookup that was suspended in a generator (seeLLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction).static voidLLVMOrcMaterializationResponsibilityAddDependencies(long MR, long Name, LLVMOrcCDependenceMapPair.Buffer Dependencies) Removed in LLVM 19.static voidLLVMOrcMaterializationResponsibilityAddDependenciesForAll(long MR, LLVMOrcCDependenceMapPair.Buffer Dependencies) Removed in LLVM 19.static longLLVMOrcMaterializationResponsibilityDefineMaterializing(long MR, LLVMOrcCSymbolFlagsMapPair.Buffer Pairs) Attempt to claim responsibility for new definitions.static longLLVMOrcMaterializationResponsibilityDelegate(long MR, org.lwjgl.PointerBuffer Symbols, org.lwjgl.PointerBuffer Result) Delegates responsibility for the given symbols to the returned materialization responsibility.static voidNotify all not-yet-emitted covered by thisMaterializationResponsibilityinstance that an error has occurred.static longReturns theExecutionSessionfor thisMaterializationResponsibility.static longReturns the initialization pseudo-symbol, if any.static @Nullable org.lwjgl.PointerBufferReturns the names of any symbols covered by thisMaterializationResponsibilityobject that have queries pending.static @Nullable LLVMOrcCSymbolFlagsMapPair.BufferReturns the symbol flags map for this responsibility instance.static longReturns the targetJITDylibthat these symbols are being materialized into.static longLLVMOrcMaterializationResponsibilityNotifyEmitted(long MR, LLVMOrcCSymbolDependenceGroup.Buffer SymbolDepGroups) Notifies the targetJITDylib(and any pending queries on thatJITDylib) that all symbols covered by thisMaterializationResponsibilityinstance have been emitted.static longNotifies the targetJITDylibthat the given symbols have been resolved.static longLLVMOrcMaterializationResponsibilityReplace(long MR, long MU) Transfers responsibility to the givenMaterializationUnitfor all symbols defined by thatMaterializationUnit.static longLLVMOrcObjectLayerAddObjectFile(long ObjLayer, long JD, long ObjBuffer) Add an object to anObjectLayerto the givenJITDylib.static longLLVMOrcObjectLayerAddObjectFileWithRT(long ObjLayer, long RT, long ObjBuffer) Add an object to anObjectLayerusing the givenResourceTracker.static voidLLVMOrcObjectLayerEmit(long ObjLayer, long R, long ObjBuffer) Emit an object buffer to anObjectLayer.static voidLLVMOrcObjectTransformLayerSetTransform(long ObjTransformLayer, LLVMOrcObjectTransformLayerTransformFunctionI TransformFunction, long Ctx) Set the transform function on anLLVMOrcObjectTransformLayer.static voidLLVMOrcReleaseResourceTracker(long RT) Reduces the ref-count of aResourceTracker.static voidReduces the ref-count for of aSymbolStringPoolentry.static longLLVMOrcResourceTrackerRemove(long RT) Remove all resources associated with the given tracker.static voidLLVMOrcResourceTrackerTransferTo(long SrcRT, long DstRT) Transfers tracking of all resources associated with resource trackerSrcRTto resource trackerDstRT.static voidIncrements the ref-count for aSymbolStringPoolentry.static voidLLVMOrcSymbolStringPoolClearDeadEntries(long SSP) Clear all unreferenced symbol string pool entries.static @Nullable StringLLVMOrcSymbolStringPoolEntryStr(long S) Return the c-string for the given symbol.static longLLVMOrcThreadSafeContextGetContext(long TSCtx) Get a reference to the wrappedLLVMContext.static longLLVMOrcThreadSafeModuleWithModuleDo(long TSM, LLVMOrcGenericIRModuleOperationFunctionI F, long Ctx) Apply the given function to the module contained in thisThreadSafeModule.static longnLLVMOrcAbsoluteSymbols(long Syms, long NumPairs) Unsafe version of:OrcAbsoluteSymbolsstatic longnLLVMOrcCreateCustomCAPIDefinitionGenerator(long F, long Ctx, long Dispose) Unsafe version of:OrcCreateCustomCAPIDefinitionGeneratorstatic longnLLVMOrcCreateCustomMaterializationUnit(long Name, long Ctx, long Syms, long NumSyms, long InitSym, long Materialize, long Discard, long Destroy) Unsafe version of:OrcCreateCustomMaterializationUnitstatic longnLLVMOrcCreateDumpObjects(long DumpDir, long IdentifierOverride) Unsafe version of:OrcCreateDumpObjectsstatic longnLLVMOrcCreateDynamicLibrarySearchGeneratorForPath(long Result, long FileName, byte GlobalPrefix, long Filter, long FilterCtx) Unsafe version of:OrcCreateDynamicLibrarySearchGeneratorForPathstatic longnLLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(long Result, byte GlobalPrefx, long Filter, long FilterCtx) Unsafe version of:OrcCreateDynamicLibrarySearchGeneratorForProcessstatic longnLLVMOrcCreateLocalIndirectStubsManager(long TargetTriple) Unsafe version of:OrcCreateLocalIndirectStubsManagerstatic longnLLVMOrcCreateLocalLazyCallThroughManager(long TargetTriple, long ES, long ErrorHandlerAddr, long LCTM) Unsafe version of:OrcCreateLocalLazyCallThroughManagerstatic longnLLVMOrcCreateStaticLibrarySearchGeneratorForPath(long Result, long ObjLayer, long FileName, long TargetTriple) Unsafe version of:OrcCreateStaticLibrarySearchGeneratorForPathstatic voidnLLVMOrcDisposeCSymbolFlagsMap(long Pairs) Unsafe version of:OrcDisposeCSymbolFlagsMapstatic voidnLLVMOrcDisposeSymbols(long Symbols) Unsafe version of:OrcDisposeSymbolsstatic longnLLVMOrcDumpObjects_CallOperator(long DumpObjects, long ObjBuffer) Unsafe version of:OrcDumpObjects_CallOperatorstatic longnLLVMOrcExecutionSessionCreateBareJITDylib(long ES, long Name) Unsafe version of:OrcExecutionSessionCreateBareJITDylibstatic longnLLVMOrcExecutionSessionCreateJITDylib(long ES, long Result, long Name) Unsafe version of:OrcExecutionSessionCreateJITDylibstatic longnLLVMOrcExecutionSessionGetJITDylibByName(long ES, long Name) Unsafe version of:OrcExecutionSessionGetJITDylibByNamestatic longnLLVMOrcExecutionSessionIntern(long ES, long Name) Unsafe version of:OrcExecutionSessionInternstatic voidnLLVMOrcExecutionSessionLookup(long ES, int K, long SearchOrder, long SearchOrderSize, long Symbols, long SymbolsSize, long HandleResult, long Ctx) Unsafe version of:OrcExecutionSessionLookupstatic voidnLLVMOrcExecutionSessionSetErrorReporter(long ES, long ReportError, long Ctx) Unsafe version of:OrcExecutionSessionSetErrorReporterstatic voidnLLVMOrcIRTransformLayerSetTransform(long IRTransformLayer, long TransformFunction, long Ctx) Unsafe version of:OrcIRTransformLayerSetTransformstatic longnLLVMOrcJITTargetMachineBuilderDetectHost(long Result) Unsafe version of:OrcJITTargetMachineBuilderDetectHoststatic longUnsafe version of:OrcJITTargetMachineBuilderGetTargetTriplestatic voidnLLVMOrcJITTargetMachineBuilderSetTargetTriple(long JTMB, long TargetTriple) Unsafe version of:OrcJITTargetMachineBuilderSetTargetTriplestatic longnLLVMOrcLazyReexports(long LCTM, long ISM, long SourceRef, long CallableAliases, long NumPairs) Unsafe version of:OrcLazyReexportsstatic voidnLLVMOrcMaterializationResponsibilityAddDependencies(long MR, long Name, long Dependencies, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityAddDependenciesstatic voidnLLVMOrcMaterializationResponsibilityAddDependenciesForAll(long MR, long Dependencies, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityAddDependenciesForAllstatic longnLLVMOrcMaterializationResponsibilityDefineMaterializing(long MR, long Pairs, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityDefineMaterializingstatic longnLLVMOrcMaterializationResponsibilityDelegate(long MR, long Symbols, long NumSymbols, long Result) Unsafe version of:OrcMaterializationResponsibilityDelegatestatic longnLLVMOrcMaterializationResponsibilityGetRequestedSymbols(long MR, long NumSymbols) Unsafe version of:OrcMaterializationResponsibilityGetRequestedSymbolsstatic longnLLVMOrcMaterializationResponsibilityGetSymbols(long MR, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityGetSymbolsstatic longnLLVMOrcMaterializationResponsibilityNotifyEmitted(long MR, long SymbolDepGroups, long NumSymbolDepGroups) Unsafe version of:OrcMaterializationResponsibilityNotifyEmittedstatic longnLLVMOrcMaterializationResponsibilityNotifyResolved(long MR, long Symbols, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityNotifyResolvedstatic voidnLLVMOrcObjectTransformLayerSetTransform(long ObjTransformLayer, long TransformFunction, long Ctx) Unsafe version of:OrcObjectTransformLayerSetTransformstatic longnLLVMOrcSymbolStringPoolEntryStr(long S) Unsafe version of:OrcSymbolStringPoolEntryStrstatic longnLLVMOrcThreadSafeModuleWithModuleDo(long TSM, long F, long Ctx) Unsafe version of:OrcThreadSafeModuleWithModuleDo
-
Field Details
-
LLVMJITSymbolGenericFlagsNone
public static final int LLVMJITSymbolGenericFlagsNoneRepresents generic linkage flags for a symbol definition.(
LLVMJITSymbolGenericFlags)Enum values:
- See Also:
-
LLVMJITSymbolGenericFlagsExported
public static final int LLVMJITSymbolGenericFlagsExportedRepresents generic linkage flags for a symbol definition.(
LLVMJITSymbolGenericFlags)Enum values:
- See Also:
-
LLVMJITSymbolGenericFlagsWeak
public static final int LLVMJITSymbolGenericFlagsWeakRepresents generic linkage flags for a symbol definition.(
LLVMJITSymbolGenericFlags)Enum values:
- See Also:
-
LLVMJITSymbolGenericFlagsCallable
public static final int LLVMJITSymbolGenericFlagsCallableRepresents generic linkage flags for a symbol definition.(
LLVMJITSymbolGenericFlags)Enum values:
- See Also:
-
LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly
public static final int LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnlyRepresents generic linkage flags for a symbol definition.(
LLVMJITSymbolGenericFlags)Enum values:
- See Also:
-
LLVMOrcLookupKindStatic
public static final int LLVMOrcLookupKindStaticLookup kind. (LLVMOrcLookupKind)This can be used by definition generators when deciding whether to produce a definition for a requested symbol.
This enum should be kept in sync with
llvm::orc::LookupKind.Enum values:
- See Also:
-
LLVMOrcLookupKindDLSym
public static final int LLVMOrcLookupKindDLSymLookup kind. (LLVMOrcLookupKind)This can be used by definition generators when deciding whether to produce a definition for a requested symbol.
This enum should be kept in sync with
llvm::orc::LookupKind.Enum values:
- See Also:
-
LLVMOrcJITDylibLookupFlagsMatchExportedSymbolsOnly
public static final int LLVMOrcJITDylibLookupFlagsMatchExportedSymbolsOnlyJITDyliblookup flags. (LLVMOrcJITDylibLookupFlags)This can be used by definition generators when deciding whether to produce a definition for a requested symbol.
This enum should be kept in sync with
llvm::orc::JITDylibLookupFlags.Enum values:
- See Also:
-
LLVMOrcJITDylibLookupFlagsMatchAllSymbols
public static final int LLVMOrcJITDylibLookupFlagsMatchAllSymbolsJITDyliblookup flags. (LLVMOrcJITDylibLookupFlags)This can be used by definition generators when deciding whether to produce a definition for a requested symbol.
This enum should be kept in sync with
llvm::orc::JITDylibLookupFlags.Enum values:
- See Also:
-
LLVMOrcSymbolLookupFlagsRequiredSymbol
public static final int LLVMOrcSymbolLookupFlagsRequiredSymbolSymbol lookup flags for lookup sets. (LLVMOrcSymbolLookupFlags)This should be kept in sync with
llvm::orc::SymbolLookupFlags.Enum values:
- See Also:
-
LLVMOrcSymbolLookupFlagsWeaklyReferencedSymbol
public static final int LLVMOrcSymbolLookupFlagsWeaklyReferencedSymbolSymbol lookup flags for lookup sets. (LLVMOrcSymbolLookupFlags)This should be kept in sync with
llvm::orc::SymbolLookupFlags.Enum values:
- See Also:
-
-
Method Details
-
nLLVMOrcExecutionSessionSetErrorReporter
public static void nLLVMOrcExecutionSessionSetErrorReporter(long ES, long ReportError, long Ctx) Unsafe version of:OrcExecutionSessionSetErrorReporter -
LLVMOrcExecutionSessionSetErrorReporter
public static void LLVMOrcExecutionSessionSetErrorReporter(long ES, LLVMOrcErrorReporterFunctionI ReportError, long Ctx) Attach a custom error reporter function to theExecutionSession.The error reporter will be called to deliver failure notices that can not be directly reported to a caller. For example, failure to resolve symbols in the JIT linker is typically reported via the error reporter (callers requesting definitions from the JIT will typically be delivered a
FailureToMaterializeerror instead). -
LLVMOrcExecutionSessionGetSymbolStringPool
public static long LLVMOrcExecutionSessionGetSymbolStringPool(long ES) Return a reference to theSymbolStringPoolfor anExecutionSession.Ownership of the pool remains with the
ExecutionSession: The caller is not required to free the pool. -
LLVMOrcSymbolStringPoolClearDeadEntries
public static void LLVMOrcSymbolStringPoolClearDeadEntries(long SSP) Clear all unreferenced symbol string pool entries.This can be called at any time to release unused entries in the
ExecutionSession's string pool. Since it locks the pool (preventing interning of any new strings) it is recommended that it only be called infrequently, ideally when the caller has reason to believe that some entries will have become unreferenced, e.g. after removing a module or closing aJITDylib. -
nLLVMOrcExecutionSessionIntern
public static long nLLVMOrcExecutionSessionIntern(long ES, long Name) Unsafe version of:OrcExecutionSessionIntern -
LLVMOrcExecutionSessionIntern
Intern a string in theExecutionSession'sSymbolStringPooland return a reference to it. This increments the ref-count of the pool entry, and the returned value should be released once the client is done with it by callingOrcReleaseSymbolStringPoolEntry.Since strings are uniqued within the
SymbolStringPoolLLVMOrcSymbolStringPoolEntryRefscan be compared by value to test string equality.Note that this function does not perform linker-mangling on the string.
-
LLVMOrcExecutionSessionIntern
Intern a string in theExecutionSession'sSymbolStringPooland return a reference to it. This increments the ref-count of the pool entry, and the returned value should be released once the client is done with it by callingOrcReleaseSymbolStringPoolEntry.Since strings are uniqued within the
SymbolStringPoolLLVMOrcSymbolStringPoolEntryRefscan be compared by value to test string equality.Note that this function does not perform linker-mangling on the string.
-
LLVMOrcRetainSymbolStringPoolEntry
public static void LLVMOrcRetainSymbolStringPoolEntry(long S) Increments the ref-count for aSymbolStringPoolentry. -
nLLVMOrcExecutionSessionLookup
public static void nLLVMOrcExecutionSessionLookup(long ES, int K, long SearchOrder, long SearchOrderSize, long Symbols, long SymbolsSize, long HandleResult, long Ctx) Unsafe version of:OrcExecutionSessionLookup -
LLVMOrcExecutionSessionLookup
public static void LLVMOrcExecutionSessionLookup(long ES, int K, @Nullable LLVMOrcCJITDylibSearchOrderElement.Buffer SearchOrder, @Nullable LLVMOrcCLookupSetElement.Buffer Symbols, LLVMOrcExecutionSessionLookupHandleResultFunctionI HandleResult, long Ctx) Look up symbols in an execution session.This is a wrapper around the general
ExecutionSession::lookupfunction.The
SearchOrderargument contains a list of (JITDylibs,JITDylibSearchFlags) pairs that describe the search order. TheJITDylibswill be searched in the given order to try to find the symbols in theSymbolsargument.The Symbols argument should contain a null-terminated array of (
SymbolStringPtr,SymbolLookupFlags) pairs describing the symbols to be searched for. This function takes ownership of the elements of theSymbolsarray. TheNamefields of theSymbolselements are taken to have been retained by the client for this function. The client should not release theNamefields, but are still responsible for destroying the array itself.The
HandleResultfunction will be called once all searched for symbols have been found, or an error occurs. TheHandleResultfunction will be passed anLLVMErrorRefindicating success or failure, and (on success) a null-terminatedLLVMOrcCSymbolMapPairsarray containing the function result, and theCtxvalue passed to the lookup function.The client is fully responsible for managing the lifetime of the
Ctxobject. A common idiom is to allocate the context prior to the lookup and deallocate it in the handler.THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
-
LLVMOrcReleaseSymbolStringPoolEntry
public static void LLVMOrcReleaseSymbolStringPoolEntry(long S) Reduces the ref-count for of aSymbolStringPoolentry. -
nLLVMOrcSymbolStringPoolEntryStr
public static long nLLVMOrcSymbolStringPoolEntryStr(long S) Unsafe version of:OrcSymbolStringPoolEntryStr -
LLVMOrcSymbolStringPoolEntryStr
Return the c-string for the given symbol.This string will remain valid until the entry is freed (once all
LLVMOrcSymbolStringPoolEntryRefshave been released). -
LLVMOrcReleaseResourceTracker
public static void LLVMOrcReleaseResourceTracker(long RT) Reduces the ref-count of aResourceTracker. -
LLVMOrcResourceTrackerTransferTo
public static void LLVMOrcResourceTrackerTransferTo(long SrcRT, long DstRT) Transfers tracking of all resources associated with resource trackerSrcRTto resource trackerDstRT. -
LLVMOrcResourceTrackerRemove
public static long LLVMOrcResourceTrackerRemove(long RT) Remove all resources associated with the given tracker. See ResourceTracker::remove(). -
LLVMOrcDisposeDefinitionGenerator
public static void LLVMOrcDisposeDefinitionGenerator(long DG) Dispose of aJITDylib::DefinitionGenerator. This should only be called if ownership has not been passed to aJITDylib(e.g. because some error prevented the client from callingOrcJITDylibAddGenerator). -
LLVMOrcDisposeMaterializationUnit
public static void LLVMOrcDisposeMaterializationUnit(long MU) Dispose of aMaterializationUnit. -
nLLVMOrcCreateCustomMaterializationUnit
public static long nLLVMOrcCreateCustomMaterializationUnit(long Name, long Ctx, long Syms, long NumSyms, long InitSym, long Materialize, long Discard, long Destroy) Unsafe version of:OrcCreateCustomMaterializationUnit -
LLVMOrcCreateCustomMaterializationUnit
public static long LLVMOrcCreateCustomMaterializationUnit(ByteBuffer Name, long Ctx, LLVMOrcCSymbolFlagsMapPair.Buffer Syms, long InitSym, LLVMOrcMaterializationUnitMaterializeFunctionI Materialize, LLVMOrcMaterializationUnitDiscardFunctionI Discard, LLVMOrcMaterializationUnitDestroyFunctionI Destroy) Create a customMaterializationUnit.Name is a name for this
MaterializationUnitto be used for identification and logging purposes (e.g. if thisMaterializationUnitproduces an object buffer then the name of that buffer will be derived from this name).The
Symslist contains the names and linkages of the symbols provided by this unit. This function takes ownership of the elements of theSymsarray. TheNamefields of the array elements are taken to have been retained for this function. The client should not release the elements of the array, but is still responsible for destroying the array itself.The
InitSymargument indicates whether or not thisMaterializationUnitcontains static initializers. If there are no static initializers (the common case) then this argument should be null. If there are static initializers thenInitSymshould be set to a unique name that also appears in theSymslist with theJITSymbolGenericFlagsMaterializationSideEffectsOnlyflag set. This function takes ownership of theInitSym, which should have been retained twice on behalf of this function: once for theSymsentry and once forInitSym. If clients wish to use theInitSymvalue after this function returns they must retain it once more for themselves.If any of the symbols in the
Symslist is looked up then theMaterializefunction will be called.If any of the symbols in the
Symslist is overridden then theDiscardfunction will be called.The caller owns the underling
MaterializationUnitand is responsible for either passing it to aJITDylib(viaOrcJITDylibDefine) or disposing of it by callingOrcDisposeMaterializationUnit.- Since:
- 13
-
LLVMOrcCreateCustomMaterializationUnit
public static long LLVMOrcCreateCustomMaterializationUnit(CharSequence Name, long Ctx, LLVMOrcCSymbolFlagsMapPair.Buffer Syms, long InitSym, LLVMOrcMaterializationUnitMaterializeFunctionI Materialize, LLVMOrcMaterializationUnitDiscardFunctionI Discard, LLVMOrcMaterializationUnitDestroyFunctionI Destroy) Create a customMaterializationUnit.Name is a name for this
MaterializationUnitto be used for identification and logging purposes (e.g. if thisMaterializationUnitproduces an object buffer then the name of that buffer will be derived from this name).The
Symslist contains the names and linkages of the symbols provided by this unit. This function takes ownership of the elements of theSymsarray. TheNamefields of the array elements are taken to have been retained for this function. The client should not release the elements of the array, but is still responsible for destroying the array itself.The
InitSymargument indicates whether or not thisMaterializationUnitcontains static initializers. If there are no static initializers (the common case) then this argument should be null. If there are static initializers thenInitSymshould be set to a unique name that also appears in theSymslist with theJITSymbolGenericFlagsMaterializationSideEffectsOnlyflag set. This function takes ownership of theInitSym, which should have been retained twice on behalf of this function: once for theSymsentry and once forInitSym. If clients wish to use theInitSymvalue after this function returns they must retain it once more for themselves.If any of the symbols in the
Symslist is looked up then theMaterializefunction will be called.If any of the symbols in the
Symslist is overridden then theDiscardfunction will be called.The caller owns the underling
MaterializationUnitand is responsible for either passing it to aJITDylib(viaOrcJITDylibDefine) or disposing of it by callingOrcDisposeMaterializationUnit.- Since:
- 13
-
nLLVMOrcAbsoluteSymbols
public static long nLLVMOrcAbsoluteSymbols(long Syms, long NumPairs) Unsafe version of:OrcAbsoluteSymbols -
LLVMOrcAbsoluteSymbols
Create aMaterializationUnitto define the given symbols as pointing to the corresponding raw addresses.This function takes ownership of the elements of the Syms array. The
Namefields of the array elements are taken to have been retained for this function. This allows the following pattern...size_t NumPairs; LLVMOrcCSymbolMapPairs Sym; -- Build Syms array -- LLVMOrcMaterializationUnitRef MU = LLVMOrcAbsoluteSymbols(Syms, NumPairs);... without requiring cleanup of the elements of the
Symarray afterwards.The client is still responsible for deleting the
Symarray itself.If a client wishes to reuse elements of the
Symarray after this call they must explicitly retain each of the elements for themselves. -
nLLVMOrcLazyReexports
public static long nLLVMOrcLazyReexports(long LCTM, long ISM, long SourceRef, long CallableAliases, long NumPairs) Unsafe version of:OrcLazyReexports -
LLVMOrcLazyReexports
public static long LLVMOrcLazyReexports(long LCTM, long ISM, long SourceRef, LLVMOrcCSymbolAliasMapPair.Buffer CallableAliases) Create aMaterializationUnitto define lazy re-expots. These are callable entry points that call through to the given symbols.This function takes ownership of the
CallableAliasesarray. TheNamefields of the array elements are taken to have been retained for this function. This allows the following pattern...size_t NumPairs; LLVMOrcCSymbolAliasMapPairs CallableAliases; -- Build CallableAliases array -- LLVMOrcMaterializationUnitRef MU = LLVMOrcLazyReexports(LCTM, ISM, JD, CallableAliases, NumPairs);... without requiring cleanup of the elements of the
CallableAliasesarray afterwards.The client is still responsible for deleting the
CallableAliasesarray itself.If a client wishes to reuse elements of the
CallableAliasesarray after this call they must explicitly retain each of the elements for themselves.- Since:
- 13
-
LLVMOrcDisposeMaterializationResponsibility
public static void LLVMOrcDisposeMaterializationResponsibility(long MR) Disposes of the passedMaterializationResponsibilityobject.This should only be done after the symbols covered by the object have either been resolved and emitted (via
OrcMaterializationResponsibilityNotifyResolvedandOrcMaterializationResponsibilityNotifyEmitted) or failed (viaOrcMaterializationResponsibilityFailMaterialization).- Since:
- 13
-
LLVMOrcMaterializationResponsibilityGetTargetDylib
public static long LLVMOrcMaterializationResponsibilityGetTargetDylib(long MR) Returns the targetJITDylibthat these symbols are being materialized into.- Since:
- 13
-
LLVMOrcMaterializationResponsibilityGetExecutionSession
public static long LLVMOrcMaterializationResponsibilityGetExecutionSession(long MR) Returns theExecutionSessionfor thisMaterializationResponsibility.- Since:
- 13
-
nLLVMOrcMaterializationResponsibilityGetSymbols
public static long nLLVMOrcMaterializationResponsibilityGetSymbols(long MR, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityGetSymbols -
LLVMOrcMaterializationResponsibilityGetSymbols
public static @Nullable LLVMOrcCSymbolFlagsMapPair.Buffer LLVMOrcMaterializationResponsibilityGetSymbols(long MR) Returns the symbol flags map for this responsibility instance.The length of the array is returned in
NumPairsand the caller is responsible for the returned memory and needs to callOrcDisposeCSymbolFlagsMap.To use the returned symbols beyond the livetime of the
MaterializationResponsibilityrequires the caller to retain the symbols explicitly.- Since:
- 13
-
nLLVMOrcDisposeCSymbolFlagsMap
public static void nLLVMOrcDisposeCSymbolFlagsMap(long Pairs) Unsafe version of:OrcDisposeCSymbolFlagsMap -
LLVMOrcDisposeCSymbolFlagsMap
Disposes of the passedLLVMOrcCSymbolFlagsMap.Does not release the entries themselves.
- Since:
- 13
-
LLVMOrcMaterializationResponsibilityGetInitializerSymbol
public static long LLVMOrcMaterializationResponsibilityGetInitializerSymbol(long MR) Returns the initialization pseudo-symbol, if any. This symbol will also be present in theSymbolFlagsMapfor thisMaterializationResponsibilityobject.The returned symbol is not retained over any mutating operation of the
MaterializationResponsbilityor beyond the lifetime thereof.- Since:
- 13
-
nLLVMOrcMaterializationResponsibilityGetRequestedSymbols
public static long nLLVMOrcMaterializationResponsibilityGetRequestedSymbols(long MR, long NumSymbols) Unsafe version of:OrcMaterializationResponsibilityGetRequestedSymbols -
LLVMOrcMaterializationResponsibilityGetRequestedSymbols
public static @Nullable org.lwjgl.PointerBuffer LLVMOrcMaterializationResponsibilityGetRequestedSymbols(long MR) Returns the names of any symbols covered by thisMaterializationResponsibilityobject that have queries pending. This information can be used to return responsibility for unrequested symbols back to theJITDylibvia the delegate method.- Since:
- 13
-
nLLVMOrcDisposeSymbols
public static void nLLVMOrcDisposeSymbols(long Symbols) Unsafe version of:OrcDisposeSymbols -
LLVMOrcDisposeSymbols
public static void LLVMOrcDisposeSymbols(org.lwjgl.PointerBuffer Symbols) Disposes of the passedLLVMOrcSymbolStringPoolEntryRef*.Does not release the symbols themselves.
- Since:
- 13
-
nLLVMOrcMaterializationResponsibilityNotifyResolved
public static long nLLVMOrcMaterializationResponsibilityNotifyResolved(long MR, long Symbols, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityNotifyResolved -
LLVMOrcMaterializationResponsibilityNotifyResolved
public static long LLVMOrcMaterializationResponsibilityNotifyResolved(long MR, LLVMOrcCSymbolMapPair.Buffer Symbols) Notifies the targetJITDylibthat the given symbols have been resolved. This will update the given symbols' addresses in theJITDylib, and notify any pending queries on the given symbols of their resolution. The given symbols must be ones covered by thisMaterializationResponsibilityinstance. Individual calls to this method may resolve a subset of the symbols, but all symbols must have been resolved prior to calling emit.This method will return an error if any symbols being resolved have been moved to the error state due to the failure of a dependency. If this method returns an error then clients should log it and call
OrcMaterializationResponsibilityFailMaterialization. If no dependencies have been registered for the symbols covered by thisMaterializationResponsibilitythen this method is guaranteed to returnErrorSuccess.- Since:
- 13
-
nLLVMOrcMaterializationResponsibilityNotifyEmitted
public static long nLLVMOrcMaterializationResponsibilityNotifyEmitted(long MR, long SymbolDepGroups, long NumSymbolDepGroups) Unsafe version of:OrcMaterializationResponsibilityNotifyEmitted -
LLVMOrcMaterializationResponsibilityNotifyEmitted
public static long LLVMOrcMaterializationResponsibilityNotifyEmitted(long MR, LLVMOrcCSymbolDependenceGroup.Buffer SymbolDepGroups) Notifies the targetJITDylib(and any pending queries on thatJITDylib) that all symbols covered by thisMaterializationResponsibilityinstance have been emitted.This function takes ownership of the symbols in the
Dependenciesstruct. This allows the following pattern...LLVMOrcSymbolStringPoolEntryRef Names[] = {...}; LLVMOrcCDependenceMapPair Dependence = {JD, {Names, sizeof(Names)}} LLVMOrcMaterializationResponsibilityAddDependencies(JD, Name, &Dependence, 1);... without requiring cleanup of the elements of the Names array afterwards.
The client is still responsible for deleting the
Dependencies.Namesarrays, and theDependenciesarray itself.This method will return an error if any symbols being resolved have been moved to the error state due to the failure of a dependency. If this method returns an error then clients should log it and call
OrcMaterializationResponsibilityFailMaterialization. If no dependencies have been registered for the symbols covered by thisMaterializationResponsibilitythen this method is guaranteed to returnErrorSuccess.- Since:
- 13
-
nLLVMOrcMaterializationResponsibilityDefineMaterializing
public static long nLLVMOrcMaterializationResponsibilityDefineMaterializing(long MR, long Pairs, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityDefineMaterializing -
LLVMOrcMaterializationResponsibilityDefineMaterializing
public static long LLVMOrcMaterializationResponsibilityDefineMaterializing(long MR, LLVMOrcCSymbolFlagsMapPair.Buffer Pairs) Attempt to claim responsibility for new definitions. This method can be used to claim responsibility for symbols that are added to a materialization unit during the compilation process (e.g. literal pool symbols). Symbol linkage rules are the same as for symbols that are defined up front: duplicate strong definitions will result in errors. Duplicate weak definitions will be discarded (in which case they will not be added to this responsibility instance).This method can be used by materialization units that want to add additional symbols at materialization time (e.g. stubs, compile callbacks, metadata)
- Since:
- 13
-
LLVMOrcMaterializationResponsibilityFailMaterialization
public static void LLVMOrcMaterializationResponsibilityFailMaterialization(long MR) Notify all not-yet-emitted covered by thisMaterializationResponsibilityinstance that an error has occurred. This will remove all symbols covered by thisMaterializationResponsibilityfrom the targetJITDylib, and send an error to any queries waiting on these symbols.- Since:
- 13
-
LLVMOrcMaterializationResponsibilityReplace
public static long LLVMOrcMaterializationResponsibilityReplace(long MR, long MU) Transfers responsibility to the givenMaterializationUnitfor all symbols defined by thatMaterializationUnit. This allows materializers to break up work based on run-time information (e.g. by introspecting which symbols have actually been looked up and materializing only those).- Since:
- 13
-
nLLVMOrcMaterializationResponsibilityDelegate
public static long nLLVMOrcMaterializationResponsibilityDelegate(long MR, long Symbols, long NumSymbols, long Result) Unsafe version of:OrcMaterializationResponsibilityDelegate -
LLVMOrcMaterializationResponsibilityDelegate
public static long LLVMOrcMaterializationResponsibilityDelegate(long MR, org.lwjgl.PointerBuffer Symbols, org.lwjgl.PointerBuffer Result) Delegates responsibility for the given symbols to the returned materialization responsibility. Useful for breaking up work between threads, or different kinds of materialization processes.The caller retains responsibility of the the passed
MaterializationResponsibility.- Since:
- 13
-
nLLVMOrcMaterializationResponsibilityAddDependencies
public static void nLLVMOrcMaterializationResponsibilityAddDependencies(long MR, long Name, long Dependencies, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityAddDependencies -
LLVMOrcMaterializationResponsibilityAddDependencies
public static void LLVMOrcMaterializationResponsibilityAddDependencies(long MR, long Name, LLVMOrcCDependenceMapPair.Buffer Dependencies) Removed in LLVM 19.- Since:
- 13
-
nLLVMOrcMaterializationResponsibilityAddDependenciesForAll
public static void nLLVMOrcMaterializationResponsibilityAddDependenciesForAll(long MR, long Dependencies, long NumPairs) Unsafe version of:OrcMaterializationResponsibilityAddDependenciesForAll -
LLVMOrcMaterializationResponsibilityAddDependenciesForAll
public static void LLVMOrcMaterializationResponsibilityAddDependenciesForAll(long MR, LLVMOrcCDependenceMapPair.Buffer Dependencies) Removed in LLVM 19.- Since:
- 13
-
nLLVMOrcExecutionSessionCreateBareJITDylib
public static long nLLVMOrcExecutionSessionCreateBareJITDylib(long ES, long Name) Unsafe version of:OrcExecutionSessionCreateBareJITDylib -
LLVMOrcExecutionSessionCreateBareJITDylib
Create a "bare"JITDylib.The client is responsible for ensuring that the
JITDylib's name is unique, e.g. by callingOrcExecutionSessionGetJITDylibByNamefirst.This call does not install any library code or symbols into the newly created
JITDylib. The client is responsible for all configuration. -
LLVMOrcExecutionSessionCreateBareJITDylib
Create a "bare"JITDylib.The client is responsible for ensuring that the
JITDylib's name is unique, e.g. by callingOrcExecutionSessionGetJITDylibByNamefirst.This call does not install any library code or symbols into the newly created
JITDylib. The client is responsible for all configuration. -
nLLVMOrcExecutionSessionCreateJITDylib
public static long nLLVMOrcExecutionSessionCreateJITDylib(long ES, long Result, long Name) Unsafe version of:OrcExecutionSessionCreateJITDylib -
LLVMOrcExecutionSessionCreateJITDylib
public static long LLVMOrcExecutionSessionCreateJITDylib(long ES, org.lwjgl.PointerBuffer Result, ByteBuffer Name) Create aJITDylib.The client is responsible for ensuring that the
JITDylib's name is unique, e.g. by callingOrcExecutionSessionGetJITDylibByNamefirst.If a
Platformis attached to theExecutionSessionthenPlatform::setupJITDylibwill be called to install standard platform symbols (e.g. standard library interposes). If noPlatformis installed then this call is equivalent toOrcExecutionSessionCreateBareJITDyliband will always return success. -
LLVMOrcExecutionSessionCreateJITDylib
public static long LLVMOrcExecutionSessionCreateJITDylib(long ES, org.lwjgl.PointerBuffer Result, CharSequence Name) Create aJITDylib.The client is responsible for ensuring that the
JITDylib's name is unique, e.g. by callingOrcExecutionSessionGetJITDylibByNamefirst.If a
Platformis attached to theExecutionSessionthenPlatform::setupJITDylibwill be called to install standard platform symbols (e.g. standard library interposes). If noPlatformis installed then this call is equivalent toOrcExecutionSessionCreateBareJITDyliband will always return success. -
nLLVMOrcExecutionSessionGetJITDylibByName
public static long nLLVMOrcExecutionSessionGetJITDylibByName(long ES, long Name) Unsafe version of:OrcExecutionSessionGetJITDylibByName -
LLVMOrcExecutionSessionGetJITDylibByName
Returns theJITDylibwith the given name, orNULLif no suchJITDylibexists. -
LLVMOrcExecutionSessionGetJITDylibByName
Returns theJITDylibwith the given name, orNULLif no suchJITDylibexists. -
LLVMOrcJITDylibCreateResourceTracker
public static long LLVMOrcJITDylibCreateResourceTracker(long JD) Return a reference to a newly created resource tracker associated withJD. The tracker is returned with an initial ref-count of 1, and must be released withOrcReleaseResourceTrackerwhen no longer needed. -
LLVMOrcJITDylibGetDefaultResourceTracker
public static long LLVMOrcJITDylibGetDefaultResourceTracker(long JD) Return a reference to the default resource tracker for the givenJITDylib. This operation will increase the retain count of the tracker: Clients should callOrcReleaseResourceTrackerwhen the result is no longer needed. -
LLVMOrcJITDylibDefine
public static long LLVMOrcJITDylibDefine(long JD, long MU) Add the givenMaterializationUnitto the givenJITDylib.If this operation succeeds then
JITDylibJDwill take ownership ofMU. If the operation fails then ownership remains with the caller who should callOrcDisposeMaterializationUnitto destroy it. -
LLVMOrcJITDylibClear
public static long LLVMOrcJITDylibClear(long JD) Calls remove on all trackers associated with thisJITDylib, seeJITDylib::clear(). -
LLVMOrcJITDylibAddGenerator
public static void LLVMOrcJITDylibAddGenerator(long JD, long DG) Add aDefinitionGeneratorto the givenJITDylib.The
JITDylibwill take ownership of the given generator: The client is no longer responsible for managing its memory. -
nLLVMOrcCreateCustomCAPIDefinitionGenerator
public static long nLLVMOrcCreateCustomCAPIDefinitionGenerator(long F, long Ctx, long Dispose) Unsafe version of:OrcCreateCustomCAPIDefinitionGenerator -
LLVMOrcCreateCustomCAPIDefinitionGenerator
public static long LLVMOrcCreateCustomCAPIDefinitionGenerator(LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI F, long Ctx, @Nullable LLVMOrcDisposeCAPIDefinitionGeneratorFunctionI Dispose) Create a custom generator.The
Fargument will be used to implement theDefinitionGenerator'stryToGeneratemethod (seeLLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction).Ctxis a context object that will be passed toF. This argument is permitted to be null.Disposeis the disposal function forCtx. This argument is permitted to be null (in which case the client is responsible for the lifetime ofCtx). -
LLVMOrcLookupStateContinueLookup
public static void LLVMOrcLookupStateContinueLookup(long S, long Err) Continue a lookup that was suspended in a generator (seeLLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction). -
nLLVMOrcCreateDynamicLibrarySearchGeneratorForProcess
public static long nLLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(long Result, byte GlobalPrefx, long Filter, long FilterCtx) Unsafe version of:OrcCreateDynamicLibrarySearchGeneratorForProcess -
LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess
public static long LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(org.lwjgl.PointerBuffer Result, byte GlobalPrefx, @Nullable LLVMOrcSymbolPredicateI Filter, long FilterCtx) Get aDynamicLibrarySearchGeneratorthat will reflect process symbols into theJITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to aJITDylibusingOrcJITDylibAddGenerator.The
GlobalPrefixargument specifies the character that appears on the front of linker-mangled symbols for the target platform (e.g. '_' on MachO). If non-null, this character will be stripped from the start of all symbol strings before passing the remaining substring todlsym.The optional
FilterandCtxarguments can be used to supply a symbol name filter: Only symbols for which the filter returns true will be visible to JIT'd code. If theFilterargument is null then all process symbols will be visible to JIT'd code. Note that the symbol name passed to theFilterfunction is the full mangled symbol: The client is responsible for stripping the global prefix if present. -
nLLVMOrcCreateDynamicLibrarySearchGeneratorForPath
public static long nLLVMOrcCreateDynamicLibrarySearchGeneratorForPath(long Result, long FileName, byte GlobalPrefix, long Filter, long FilterCtx) Unsafe version of:OrcCreateDynamicLibrarySearchGeneratorForPath -
LLVMOrcCreateDynamicLibrarySearchGeneratorForPath
public static long LLVMOrcCreateDynamicLibrarySearchGeneratorForPath(org.lwjgl.PointerBuffer Result, ByteBuffer FileName, byte GlobalPrefix, @Nullable LLVMOrcSymbolPredicateI Filter, long FilterCtx) Get aLLVMOrcCreateDynamicLibrarySearchGeneratorForPaththat will reflect library symbols into theJITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to aJITDylibusingOrcJITDylibAddGenerator,The
GlobalPrefixargument specifies the character that appears on the front of linker-mangled symbols for the target platform (e.g. '_' on MachO). If non-null, this character will be stripped from the start of all symbol strings before passing the remaining substring todlsym.The optional
FilterandCtxarguments can be used to supply a symbol name filter: Only symbols for which the filter returns true will be visible to JIT'd code. If theFilterargument is null then all library symbols will be visible to JIT'd code. Note that the symbol name passed to theFilterfunction is the full mangled symbol: The client is responsible for stripping the global prefix if present.THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
-
LLVMOrcCreateDynamicLibrarySearchGeneratorForPath
public static long LLVMOrcCreateDynamicLibrarySearchGeneratorForPath(org.lwjgl.PointerBuffer Result, CharSequence FileName, byte GlobalPrefix, @Nullable LLVMOrcSymbolPredicateI Filter, long FilterCtx) Get aLLVMOrcCreateDynamicLibrarySearchGeneratorForPaththat will reflect library symbols into theJITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to aJITDylibusingOrcJITDylibAddGenerator,The
GlobalPrefixargument specifies the character that appears on the front of linker-mangled symbols for the target platform (e.g. '_' on MachO). If non-null, this character will be stripped from the start of all symbol strings before passing the remaining substring todlsym.The optional
FilterandCtxarguments can be used to supply a symbol name filter: Only symbols for which the filter returns true will be visible to JIT'd code. If theFilterargument is null then all library symbols will be visible to JIT'd code. Note that the symbol name passed to theFilterfunction is the full mangled symbol: The client is responsible for stripping the global prefix if present.THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
-
nLLVMOrcCreateStaticLibrarySearchGeneratorForPath
public static long nLLVMOrcCreateStaticLibrarySearchGeneratorForPath(long Result, long ObjLayer, long FileName, long TargetTriple) Unsafe version of:OrcCreateStaticLibrarySearchGeneratorForPath -
LLVMOrcCreateStaticLibrarySearchGeneratorForPath
public static long LLVMOrcCreateStaticLibrarySearchGeneratorForPath(org.lwjgl.PointerBuffer Result, long ObjLayer, ByteBuffer FileName, @Nullable ByteBuffer TargetTriple) Get aLLVMOrcCreateStaticLibrarySearchGeneratorForPaththat will reflect static library symbols into theJITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to aJITDylibusingOrcJITDylibAddGenerator,Call with the optional
TargetTripleargument will succeed if the file at the given path is a static library or a MachO universal binary containing a static library that is compatible with the given triple. Otherwise it will return an error.THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
-
LLVMOrcCreateStaticLibrarySearchGeneratorForPath
public static long LLVMOrcCreateStaticLibrarySearchGeneratorForPath(org.lwjgl.PointerBuffer Result, long ObjLayer, CharSequence FileName, @Nullable CharSequence TargetTriple) Get aLLVMOrcCreateStaticLibrarySearchGeneratorForPaththat will reflect static library symbols into theJITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to aJITDylibusingOrcJITDylibAddGenerator,Call with the optional
TargetTripleargument will succeed if the file at the given path is a static library or a MachO universal binary containing a static library that is compatible with the given triple. Otherwise it will return an error.THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
-
LLVMOrcCreateNewThreadSafeContext
public static long LLVMOrcCreateNewThreadSafeContext()Create aThreadSafeContextcontaining a newLLVMContext.Ownership of the underlying
ThreadSafeContextdata is shared: Clients can and should dispose of theirThreadSafeContextas soon as they no longer need to refer to it directly. Other references (e.g. fromThreadSafeModules) will keep the data alive as long as it is needed. -
LLVMOrcThreadSafeContextGetContext
public static long LLVMOrcThreadSafeContextGetContext(long TSCtx) Get a reference to the wrappedLLVMContext. -
LLVMOrcDisposeThreadSafeContext
public static void LLVMOrcDisposeThreadSafeContext(long TSCtx) Dispose of aThreadSafeContext. -
LLVMOrcCreateNewThreadSafeModule
public static long LLVMOrcCreateNewThreadSafeModule(long M, long TSCtx) Create aThreadSafeModulewrapper around the given LLVM module. This takes ownership of the M argument which should not be disposed of or referenced after this function returns.Ownership of the
ThreadSafeModuleis unique: If it is transferred to the JIT (e.g. byOrcLLJITAddLLVMIRModule) then the client is no longer responsible for it. If it is not transferred to the JIT then the client should callOrcDisposeThreadSafeModuleto dispose of it. -
LLVMOrcDisposeThreadSafeModule
public static void LLVMOrcDisposeThreadSafeModule(long TSM) Dispose of aThreadSafeModule. This should only be called if ownership has not been passed to LLJIT (e.g. because some error prevented the client from adding this to the JIT). -
nLLVMOrcThreadSafeModuleWithModuleDo
public static long nLLVMOrcThreadSafeModuleWithModuleDo(long TSM, long F, long Ctx) Unsafe version of:OrcThreadSafeModuleWithModuleDo -
LLVMOrcThreadSafeModuleWithModuleDo
public static long LLVMOrcThreadSafeModuleWithModuleDo(long TSM, LLVMOrcGenericIRModuleOperationFunctionI F, long Ctx) Apply the given function to the module contained in thisThreadSafeModule.- Since:
- 13
-
nLLVMOrcJITTargetMachineBuilderDetectHost
public static long nLLVMOrcJITTargetMachineBuilderDetectHost(long Result) Unsafe version of:OrcJITTargetMachineBuilderDetectHost -
LLVMOrcJITTargetMachineBuilderDetectHost
public static long LLVMOrcJITTargetMachineBuilderDetectHost(org.lwjgl.PointerBuffer Result) Create aJITTargetMachineBuilderby detecting the host.On success the client owns the resulting
JITTargetMachineBuilder. It must be passed to a consuming operation (e.g.OrcLLJITBuilderSetJITTargetMachineBuilder) or disposed of by callingOrcDisposeJITTargetMachineBuilder. -
LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine
public static long LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine(long TM) Create aJITTargetMachineBuilderfrom the givenTargetMachinetemplate.This operation takes ownership of the given
TargetMachineand destroys it before returing. The resultingJITTargetMachineBuilderis owned by the client and must be passed to a consuming operation (e.g.OrcLLJITBuilderSetJITTargetMachineBuilder) or disposed of by callingOrcDisposeJITTargetMachineBuilder. -
LLVMOrcDisposeJITTargetMachineBuilder
public static void LLVMOrcDisposeJITTargetMachineBuilder(long JTMB) Dispose of aJITTargetMachineBuilder. -
nLLVMOrcJITTargetMachineBuilderGetTargetTriple
public static long nLLVMOrcJITTargetMachineBuilderGetTargetTriple(long JTMB) Unsafe version of:OrcJITTargetMachineBuilderGetTargetTriple -
LLVMOrcJITTargetMachineBuilderGetTargetTriple
Returns the target triple for the givenJITTargetMachineBuilderas a string.The caller owns the resulting string as must dispose of it by calling
LLVMDisposeMessage.- Since:
- 13
-
nLLVMOrcJITTargetMachineBuilderSetTargetTriple
public static void nLLVMOrcJITTargetMachineBuilderSetTargetTriple(long JTMB, long TargetTriple) Unsafe version of:OrcJITTargetMachineBuilderSetTargetTriple -
LLVMOrcJITTargetMachineBuilderSetTargetTriple
public static void LLVMOrcJITTargetMachineBuilderSetTargetTriple(long JTMB, ByteBuffer TargetTriple) Sets the target triple for the givenJITTargetMachineBuilderto the given string.- Since:
- 13
-
LLVMOrcJITTargetMachineBuilderSetTargetTriple
public static void LLVMOrcJITTargetMachineBuilderSetTargetTriple(long JTMB, CharSequence TargetTriple) Sets the target triple for the givenJITTargetMachineBuilderto the given string.- Since:
- 13
-
LLVMOrcObjectLayerAddObjectFile
public static long LLVMOrcObjectLayerAddObjectFile(long ObjLayer, long JD, long ObjBuffer) Add an object to anObjectLayerto the givenJITDylib.Adds a buffer representing an object file to the given
JITDylibusing the given ObjectLayer instance. This operation transfers ownership of the buffer to theObjectLayerinstance. The buffer should not be disposed of or referenced once this function returns.Resources associated with the given object will be tracked by the given
JITDylib's defaultResourceTracker.- Since:
- 13
-
LLVMOrcObjectLayerAddObjectFileWithRT
public static long LLVMOrcObjectLayerAddObjectFileWithRT(long ObjLayer, long RT, long ObjBuffer) Add an object to anObjectLayerusing the givenResourceTracker.Adds a buffer representing an object file to the given
ResourceTracker'sJITDylibusing the givenObjectLayerinstance. This operation transfers ownership of the buffer to theObjectLayerinstance. The buffer should not be disposed of or referenced once this function returns.Resources associated with the given object will be tracked by
ResourceTrackerRT.- Since:
- 13
-
LLVMOrcObjectLayerEmit
public static void LLVMOrcObjectLayerEmit(long ObjLayer, long R, long ObjBuffer) Emit an object buffer to anObjectLayer.Ownership of the responsibility object and object buffer pass to this function. The client is not responsible for cleanup.
- Since:
- 13
-
LLVMOrcDisposeObjectLayer
public static void LLVMOrcDisposeObjectLayer(long ObjLayer) Dispose of anObjectLayer. -
LLVMOrcIRTransformLayerEmit
public static void LLVMOrcIRTransformLayerEmit(long IRTransformLayer, long MR, long TSM) - Since:
- 13
-
nLLVMOrcIRTransformLayerSetTransform
public static void nLLVMOrcIRTransformLayerSetTransform(long IRTransformLayer, long TransformFunction, long Ctx) Unsafe version of:OrcIRTransformLayerSetTransform -
LLVMOrcIRTransformLayerSetTransform
public static void LLVMOrcIRTransformLayerSetTransform(long IRTransformLayer, LLVMOrcIRTransformLayerTransformFunctionI TransformFunction, long Ctx) Set the transform function of the provided transform layer, passing through a pointer to user provided context.- Since:
- 13
-
nLLVMOrcObjectTransformLayerSetTransform
public static void nLLVMOrcObjectTransformLayerSetTransform(long ObjTransformLayer, long TransformFunction, long Ctx) Unsafe version of:OrcObjectTransformLayerSetTransform -
LLVMOrcObjectTransformLayerSetTransform
public static void LLVMOrcObjectTransformLayerSetTransform(long ObjTransformLayer, LLVMOrcObjectTransformLayerTransformFunctionI TransformFunction, long Ctx) Set the transform function on anLLVMOrcObjectTransformLayer.- Since:
- 13
-
nLLVMOrcCreateLocalIndirectStubsManager
public static long nLLVMOrcCreateLocalIndirectStubsManager(long TargetTriple) Unsafe version of:OrcCreateLocalIndirectStubsManager -
LLVMOrcCreateLocalIndirectStubsManager
Create aLocalIndirectStubsManagerfrom the given target triple.The resulting
IndirectStubsManageris owned by the client and must be disposed of by callingOrcDisposeIndirectStubsManager.- Since:
- 13
-
LLVMOrcCreateLocalIndirectStubsManager
Create aLocalIndirectStubsManagerfrom the given target triple.The resulting
IndirectStubsManageris owned by the client and must be disposed of by callingOrcDisposeIndirectStubsManager.- Since:
- 13
-
LLVMOrcDisposeIndirectStubsManager
public static void LLVMOrcDisposeIndirectStubsManager(long ISM) Dispose of anIndirectStubsManager.- Since:
- 13
-
nLLVMOrcCreateLocalLazyCallThroughManager
public static long nLLVMOrcCreateLocalLazyCallThroughManager(long TargetTriple, long ES, long ErrorHandlerAddr, long LCTM) Unsafe version of:OrcCreateLocalLazyCallThroughManager -
LLVMOrcCreateLocalLazyCallThroughManager
public static long LLVMOrcCreateLocalLazyCallThroughManager(ByteBuffer TargetTriple, long ES, long ErrorHandlerAddr, org.lwjgl.PointerBuffer LCTM) - Since:
- 13
-
LLVMOrcCreateLocalLazyCallThroughManager
public static long LLVMOrcCreateLocalLazyCallThroughManager(CharSequence TargetTriple, long ES, long ErrorHandlerAddr, org.lwjgl.PointerBuffer LCTM) - Since:
- 13
-
LLVMOrcDisposeLazyCallThroughManager
public static void LLVMOrcDisposeLazyCallThroughManager(long LCTM) Dispose of anLazyCallThroughManager.- Since:
- 13
-
nLLVMOrcCreateDumpObjects
public static long nLLVMOrcCreateDumpObjects(long DumpDir, long IdentifierOverride) Unsafe version of:OrcCreateDumpObjects -
LLVMOrcCreateDumpObjects
Create aDumpObjectsinstance.DumpDirspecifies the path to write dumped objects to.DumpDirmay be empty in which case files will be dumped to the working directory.IdentifierOverridespecifies a file name stem to use when dumping objects. If empty then eachMemoryBuffer's identifier will be used (with a .o suffix added if not already present). If an identifier override is supplied it will be used instead, along with an incrementing counter (since all buffers will use the same identifier, the resulting files will be named<ident>.o,<ident>.2.o,<ident>.3.o, and so on). IdentifierOverride should not contain an extension, as a .o suffix will be added byDumpObjects.- Since:
- 13
-
LLVMOrcCreateDumpObjects
Create aDumpObjectsinstance.DumpDirspecifies the path to write dumped objects to.DumpDirmay be empty in which case files will be dumped to the working directory.IdentifierOverridespecifies a file name stem to use when dumping objects. If empty then eachMemoryBuffer's identifier will be used (with a .o suffix added if not already present). If an identifier override is supplied it will be used instead, along with an incrementing counter (since all buffers will use the same identifier, the resulting files will be named<ident>.o,<ident>.2.o,<ident>.3.o, and so on). IdentifierOverride should not contain an extension, as a .o suffix will be added byDumpObjects.- Since:
- 13
-
LLVMOrcDisposeDumpObjects
public static void LLVMOrcDisposeDumpObjects(long DumpObjects) Dispose of aDumpObjectsinstance.- Since:
- 13
-
nLLVMOrcDumpObjects_CallOperator
public static long nLLVMOrcDumpObjects_CallOperator(long DumpObjects, long ObjBuffer) Unsafe version of:OrcDumpObjects_CallOperator -
LLVMOrcDumpObjects_CallOperator
public static long LLVMOrcDumpObjects_CallOperator(long DumpObjects, org.lwjgl.PointerBuffer ObjBuffer) Dump the contents of the givenMemoryBuffer.- Since:
- 13
-