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 global_set_readonly(&self)
pub fn set_register_name(&self, reg_name: &str)
pub fn set_alignment(&self, alignment: i32)
pub fn get_alignment(&self) -> i32
pub fn add_attribute(&self, attribute: VarAttribute)
Trait Implementations§
impl<'ctx> Copy for LValue<'ctx>
impl<'ctx> Eq for LValue<'ctx>
impl<'ctx> StructuralPartialEq for LValue<'ctx>
Auto Trait Implementations§
impl<'ctx> Freeze for LValue<'ctx>
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