pub struct LValue<'ctx> { /* private fields */ }
Expand description
An LValue in gccjit represents a value that has a concrete location in memory. A LValue can be converted into an RValue through the ToRValue trait. It is also possible to get the address of an LValue.
Implementations§
source§impl<'ctx> LValue<'ctx>
impl<'ctx> LValue<'ctx>
sourcepub fn access_field(
&self,
loc: Option<Location<'ctx>>,
field: Field<'ctx>
) -> LValue<'ctx>
pub fn access_field( &self, loc: Option<Location<'ctx>>, field: Field<'ctx> ) -> LValue<'ctx>
Given an LValue x and a Field f, gets an LValue for the field access x.f.
sourcepub fn get_address(&self, loc: Option<Location<'ctx>>) -> RValue<'ctx>
pub fn get_address(&self, loc: Option<Location<'ctx>>) -> RValue<'ctx>
Given an LValue x, returns the RValue address of x, akin to C’s &x.
sourcepub fn global_set_initializer(&self, blob: &[u8])
pub fn global_set_initializer(&self, blob: &[u8])
Set the initialization value for a global variable.
sourcepub fn global_set_initializer_rvalue(&self, value: RValue<'ctx>) -> LValue<'ctx>
pub fn global_set_initializer_rvalue(&self, value: RValue<'ctx>) -> LValue<'ctx>
Set the initialization value for a global variable.
pub fn set_tls_model(&self, model: TlsModel)
pub fn set_link_section(&self, name: &str)
pub fn set_register_name(&self, reg_name: &str)
pub fn set_alignment(&self, alignment: i32)
pub fn get_alignment(&self) -> i32
Trait Implementations§
source§impl<'ctx> PartialEq for LValue<'ctx>
impl<'ctx> PartialEq for LValue<'ctx>
impl<'ctx> Copy for LValue<'ctx>
impl<'ctx> Eq for LValue<'ctx>
impl<'ctx> StructuralPartialEq for LValue<'ctx>
Auto Trait Implementations§
impl<'ctx> RefUnwindSafe for LValue<'ctx>
impl<'ctx> !Send for LValue<'ctx>
impl<'ctx> !Sync for LValue<'ctx>
impl<'ctx> Unpin for LValue<'ctx>
impl<'ctx> UnwindSafe for LValue<'ctx>
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