public static void InitializeMCJITCompilerOptions(LLVMMCJITCompilerOptions Options) { unsafe { InitializeMCJITCompilerOptions(&Options, sizeof(LLVMMCJITCompilerOptions)); } }
public LLVMExecutionEngineRef CreateMCJITCompiler(ref LLVMMCJITCompilerOptions Options) { if (!TryCreateMCJITCompiler(out LLVMExecutionEngineRef JIT, ref Options, out string Error)) { throw new ExternalException(Error); } return(JIT); }
public static ExecutionEngine CreateMCJITCompiler(Module module, LLVMMCJITCompilerOptions options) { LLVM.InitializeMCJITCompilerOptions(options); if (LLVM.CreateMCJITCompilerForModule(out var instance, module.instance, options, out var error)) { ThrowError(error); } return(new ExecutionEngine(instance)); }
public static ExecutionEngine CreateMCJITCompiler(Module module, LLVMMCJITCompilerOptions options, int optionsSize) { LLVM.InitializeMCJITCompilerOptions(out options, optionsSize); IntPtr error; LLVMExecutionEngineRef instance; if (LLVM.CreateMCJITCompilerForModule(out instance, module.instance, out options, optionsSize, out error)) { ThrowError(error); } return new ExecutionEngine(instance); }
public static ExecutionEngine CreateMCJITCompiler(Module module, LLVMMCJITCompilerOptions options, size_t optionsSize) { LLVM.InitializeMCJITCompilerOptions(out options, optionsSize); IntPtr error; LLVMExecutionEngineRef instance; if (LLVM.CreateMCJITCompilerForModule(out instance, module.instance, out options, optionsSize, out error)) { ThrowError(error); } return(new ExecutionEngine(instance)); }
public bool TryCreateMCJITCompiler(out LLVMExecutionEngineRef OutJIT, ref LLVMMCJITCompilerOptions Options, out string OutError) { fixed(LLVMExecutionEngineRef *pOutJIT = &OutJIT) fixed(LLVMMCJITCompilerOptions * pOptions = &Options) { sbyte *pError; var result = LLVM.CreateMCJITCompilerForModule((LLVMOpaqueExecutionEngine **)pOutJIT, this, pOptions, (UIntPtr)Marshal.SizeOf <LLVMMCJITCompilerOptions>(), &pError); if (pError is null) { OutError = string.Empty; } else { var span = new ReadOnlySpan <byte>(pError, int.MaxValue); OutError = span.Slice(0, span.IndexOf((byte)'\0')).AsString(); } return(result == 0); } }
public static LLVMBool CreateMCJITCompilerForModule(out LLVMExecutionEngineRef OutJIT, LLVMModuleRef M, LLVMMCJITCompilerOptions Options, out string OutError) { LLVMBool retVal; IntPtr message; unsafe { retVal = CreateMCJITCompilerForModule(out OutJIT, M, &Options, sizeof(LLVMMCJITCompilerOptions), out message); } OutError = message != IntPtr.Zero && retVal.Value != 0 ? Marshal.PtrToStringAnsi(message) : null; DisposeMessage(message); return(retVal); }
public static extern void InitializeMCJITCompilerOptions(out LLVMMCJITCompilerOptions @Options, int @SizeOfOptions);
public static extern LLVMBool CreateMCJITCompilerForModule(out LLVMExecutionEngineRef @OutJIT, LLVMModuleRef @M, out LLVMMCJITCompilerOptions @Options, int @SizeOfOptions, out IntPtr @OutError);
public static unsafe void InitializeMCJITCompilerOptions(LLVMMCJITCompilerOptions Options) { InitializeMCJITCompilerOptions(out Options, (IntPtr)(sizeof(LLVMMCJITCompilerOptions))); }
public bool TryCreateMCJITCompiler(out LLVMExecutionEngineRef OutJIT, out string OutError) { var Options = LLVMMCJITCompilerOptions.Create(); return(TryCreateMCJITCompiler(out OutJIT, ref Options, out OutError)); }