pub struct LLVMContext { /* private fields */ }
Implementations§
Source§impl LLVMContext
impl LLVMContext
pub fn new() -> Self
pub fn with_mc_jit() -> Self
pub fn as_ref(&self) -> LLVMContextRef
pub fn parse_ir(&self, llvm_ir: impl AsRef<str>) -> Result<LLVMModule, String>
pub fn create_module(&self, name: impl AsRef<str>) -> LLVMModule
pub fn i32_type(&self) -> LLVMType
pub fn array_type(&self, el_ty: LLVMType, n: u64) -> LLVMType
pub fn i8_type(&self) -> LLVMType
pub fn function_type( &self, return_type: LLVMType, param_types: Vec<(String, LLVMType)>, ) -> LLVMType
pub fn function_type_with_var_arg( &self, return_type: LLVMType, param_types: Vec<(String, LLVMType)>, ) -> LLVMType
pub fn unit_type(&self) -> LLVMType
pub fn ptr_type(&self, t: LLVMType) -> LLVMType
pub fn const_string(&self, str: impl AsRef<str>) -> LLVMValueRef
pub fn create_named_struct_type( &self, name: impl AsRef<str>, element_type: Vec<(String, LLVMType)>, ) -> LLVMType
Trait Implementations§
Source§impl Clone for LLVMContext
impl Clone for LLVMContext
Source§fn clone(&self) -> LLVMContext
fn clone(&self) -> LLVMContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LLVMContext
impl Debug for LLVMContext
Source§impl Default for LLVMContext
impl Default for LLVMContext
Auto Trait Implementations§
impl Freeze for LLVMContext
impl RefUnwindSafe for LLVMContext
impl !Send for LLVMContext
impl !Sync for LLVMContext
impl Unpin for LLVMContext
impl UnwindSafe for LLVMContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more