Method LoadFrom
LoadFrom(String, Context)
Load a bit-code module from a given file
Declaration
public static BitcodeModule LoadFrom(string path, Context context)
Parameters
public static BitcodeModule LoadFrom(string path, Context context)
String | path | path of the file to load |
Context | context | Context to use for creating the module |
Returns
BitcodeModule | Loaded BitcodeModule |
LoadFrom(MemoryBuffer, Context)
Load bit code from a memory buffer
Declaration
public static BitcodeModule LoadFrom(MemoryBuffer buffer, Context context)
Parameters
public static BitcodeModule LoadFrom(MemoryBuffer buffer, Context context)
MemoryBuffer | buffer | Buffer to load from |
Context | context | Context to load the module into |
Returns
BitcodeModule | Loaded BitcodeModule |
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.