pub struct Module { /* fields omitted */ }
Expand description
Wrapper for a LLVM Module with its own LLVM Context.
Create a new Module instance.
Panics if creating the context or the module fails.
Dump LLVM IR emitted into the Module to stdout.
Get a type reference representing a f64
float.
Panics if LLVM API returns a null
pointer.
Get a type reference representing a fn(args) -> ret
function.
Panics if LLVM API returns a null
pointer.
Add a function with the given name
and fn_type
to the module and return a value
reference representing the function.
Panics if LLVM API returns a null
pointer or name
could not be converted to a
SmallCStr
.
Get a function value reference to the function with the given name
if it was previously
added to the module with add_fn
.
Panics if name
could not be converted to a SmallCStr
.
Append a Basic Block to the end of the function referenced by the value reference
fn_value
.
Panics if LLVM API returns a null
pointer.
Executes the destructor for this type. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.