Struct llvm_kaleidoscope_rs::llvm::Module[][src]

pub struct Module { /* fields omitted */ }
Expand description

Wrapper for a LLVM Module with its own LLVM Context.

Implementations

Create a new Module instance.

Panics

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

Panics if LLVM API returns a null pointer.

Get a type reference representing a fn(args) -> ret function.

Panics

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

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

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

Panics if LLVM API returns a null pointer.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.