Table of Contents

Method LoadFrom

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

LoadFrom(LazyEncodedString, IContext)

Load a bit-code module from a given file

public static Module LoadFrom(LazyEncodedString path, IContext context)

Parameters

path LazyEncodedString

path of the file to load

context IContext

Context to use for creating the module

Returns

Module

Loaded Module

LoadFrom(MemoryBuffer, IContext)

Load bit code from a memory buffer

public static Module LoadFrom(MemoryBuffer buffer, IContext context)

Parameters

buffer MemoryBuffer

Buffer to load from

context IContext

Context to load the module into

Returns

Module

Loaded Module

Remarks

This along with WriteToBuffer() are useful for "cloning" a module from one context to another. This allows creation of multiple modules on different threads and contexts and later moving them to a single context in order to link them into a single final module for optimization.