Top Description Inners Constructors Methods
org.lwjgl.llvm

public abstract Class LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction

extends Callback
implements LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI
Class Inheritance
All Implemented Interfaces
org.lwjgl.llvm.LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI, org.lwjgl.system.CallbackI, org.lwjgl.system.Pointer
Known Direct Subclasses
org.lwjgl.llvm.LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction.Container
Imports
javax.annotation.*, org.lwjgl.system.*

Instances of this class may be passed to the OrcCreateCustomCAPIDefinitionGenerator method.

Type


LLVMErrorRef (*invoke) (
    LLVMOrcDefinitionGeneratorRef GeneratorObj,
    void *Ctx,
    LLVMOrcLookupStateRef *LookupState,
    LLVMOrcLookupKind Kind,
    LLVMOrcJITDylibRef JD,
    LLVMOrcJITDylibLookupFlags JDLookupFlags,
    LLVMOrcCLookupSet LookupSet,
    size_t LookupSetSize
)

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
protected
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction

Returns:

the new LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction
create
(long functionPointer)

Creates a LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction instance from the specified function pointer.

public static LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction
create(LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI instance)

Creates a LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction instance that delegates to the specified LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI instance.

public static LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction
createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

Inherited from org.lwjgl.system.Callback:
addressequalsfreefreegetgetSafehashCodetoString

Constructor Detail

LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionback to summary
protected LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction()
LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionback to summary
pack-priv LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction(long functionPointer)

Method Detail

createback to summary
public static LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction create(long functionPointer)

Creates a LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction instance from the specified function pointer.

Returns:LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction

the new LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction

createback to summary
public static LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction create(LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI instance)

Creates a LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction instance that delegates to the specified LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI instance.

createSafeback to summary
public static LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

Annotations
@Nullable
org.lwjgl.llvm back to summary

private final Class LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction.Container

extends LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public long
invoke(long
will contain the address of the custom generator object
GeneratorObj
,
long
will contain the context object passed to LLVMOrcCreateCustomCAPIDefinitionGenerator.
Ctx
,
long
will contain a pointer to an LLVMOrcLookupStateRef object.

This can optionally be modified to make the definition generation process asynchronous: If the LookupStateRef value is copied, and the original LLVMOrcLookupStateRef set to null, the lookup will be suspended. Once the asynchronous definition process has been completed clients must call LLVMOrcLookupStateContinueLookup to continue the lookup (this should be done unconditionally, even if errors have occurred in the mean time, to free the lookup state memory and notify the query object of the failures). If LookupState is captured this function must return ErrorSuccess.

LookupState
,
int
can be inspected to determine the lookup kind (e.g. as-if-during-static-link, or as-if-during-dlsym)
Kind
,
long
specifies which JITDylib the definitions should be generated into
JD
,
int
can be inspected to determine whether the original lookup included non-exported symbols
JDLookupFlags
,
long
contains the set of symbols that could not be found in JD already (the set of generation candidates)
LookupSet
,
long LookupSetSize)

Implements org.lwjgl.llvm.LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI.invoke.

A custom generator function.
Inherited from org.lwjgl.llvm.LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction:
createcreatecreateSafe

Field Detail

delegateback to summary
private final LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI delegate

Constructor Detail

Containerback to summary
pack-priv Container(long functionPointer, LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI delegate)

Method Detail

invokeback to summary
public long invoke(long GeneratorObj, long Ctx, long LookupState, int Kind, long JD, int JDLookupFlags, long LookupSet, long LookupSetSize)

Implements org.lwjgl.llvm.LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI.invoke.

Doc from org.lwjgl.llvm.LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI.invoke.

A custom generator function.

This can be used to create a custom generator object using OrcCreateCustomCAPIDefinitionGenerator. The resulting object can be attached to a JITDylib, via OrcJITDylibAddGenerator, to receive callbacks when lookups fail to match existing definitions.

Parameters
GeneratorObj:long

will contain the address of the custom generator object

Ctx:long

will contain the context object passed to LLVMOrcCreateCustomCAPIDefinitionGenerator.

LookupState:long

will contain a pointer to an LLVMOrcLookupStateRef object.

This can optionally be modified to make the definition generation process asynchronous: If the LookupStateRef value is copied, and the original LLVMOrcLookupStateRef set to null, the lookup will be suspended. Once the asynchronous definition process has been completed clients must call LLVMOrcLookupStateContinueLookup to continue the lookup (this should be done unconditionally, even if errors have occurred in the mean time, to free the lookup state memory and notify the query object of the failures). If LookupState is captured this function must return ErrorSuccess.

Kind:int

can be inspected to determine the lookup kind (e.g. as-if-during-static-link, or as-if-during-dlsym)

JD:long

specifies which JITDylib the definitions should be generated into

JDLookupFlags:int

can be inspected to determine whether the original lookup included non-exported symbols

LookupSet:long

contains the set of symbols that could not be found in JD already (the set of generation candidates)

Annotations
@Override