Table of Contents

Method AddModule

Namespace
Ubiquity.NET.Llvm.OrcJITv2
Assembly
Ubiquity.NET.Llvm.dll

AddModule(Module)

Adds a module to this context

public ThreadSafeModule AddModule(Module perThreadModule)

Parameters

perThreadModule Module

Module to add

Returns

ThreadSafeModule

ThreadSafe module added to this context

Remarks

This creates a new ThreadSafeModule in this context. The resulting ThreadSafeModule has a ref count on the context and therefore it is safe (and appropriate) to dispose of this instance.

important

Ownership of the input perThreadModule is transferred to the returned value and is NOT usable after this call completes without exception (Except to call Dispose which is a NOP). However if an exception occurs, then ownership remains with the caller. Thus callers should ALWAYS call Dispose on the result and should NOT assume it is valid.