Struct llvm_kaleidoscope_rs::codegen::Codegen
source · [−]pub struct Codegen<'llvm, 'a> { /* private fields */ }
Expand description
Code generator from kaleidoscope AST to LLVM IR.
Implementations
sourceimpl<'llvm, 'a> Codegen<'llvm, 'a>
impl<'llvm, 'a> Codegen<'llvm, 'a>
sourcepub fn compile(
module: &'llvm Module,
fn_protos: &mut HashMap<String, PrototypeAST>,
compilee: Either<&PrototypeAST, &FunctionAST>
) -> Result<FnValue<'llvm>, String>
pub fn compile(
module: &'llvm Module,
fn_protos: &mut HashMap<String, PrototypeAST>,
compilee: Either<&PrototypeAST, &FunctionAST>
) -> Result<FnValue<'llvm>, String>
Compile either a PrototypeAST
or a FunctionAST
into the LLVM module
.
Auto Trait Implementations
impl<'llvm, 'a> RefUnwindSafe for Codegen<'llvm, 'a>
impl<'llvm, 'a> !Send for Codegen<'llvm, 'a>
impl<'llvm, 'a> !Sync for Codegen<'llvm, 'a>
impl<'llvm, 'a> Unpin for Codegen<'llvm, 'a>where
'llvm: 'a,
impl<'llvm, 'a> !UnwindSafe for Codegen<'llvm, 'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more