Struct rustc_codegen_ssa::mir::operand::OperandRef [−][src]
pub struct OperandRef<'tcx, V> {
pub val: OperandValue<V>,
pub layout: TyAndLayout<'tcx>,
}Expand description
An OperandRef is an “SSA” reference to a Rust value, along with
its type.
NOTE: unless you know a value’s type exactly, you should not
generate LLVM opcodes acting on it and instead act via methods,
to avoid nasty edge cases. In particular, using Builder::store
directly is sure to cause problems – use OperandRef::store
instead.
Fields
val: OperandValue<V>layout: TyAndLayout<'tcx>Implementations
impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V>[src]
impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V>[src]pub fn new_zst<Bx: BuilderMethods<'a, 'tcx, Value = V>>(
bx: &mut Bx,
layout: TyAndLayout<'tcx>
) -> OperandRef<'tcx, V>[src]
bx: &mut Bx,
layout: TyAndLayout<'tcx>
) -> OperandRef<'tcx, V>
pub fn from_const<Bx: BuilderMethods<'a, 'tcx, Value = V>>(
bx: &mut Bx,
val: ConstValue<'tcx>,
ty: Ty<'tcx>
) -> Self[src]
bx: &mut Bx,
val: ConstValue<'tcx>,
ty: Ty<'tcx>
) -> Self
pub fn immediate(self) -> V[src]
pub fn immediate(self) -> V[src]Asserts that this operand refers to a scalar and returns a reference to its value.
pub fn deref<Cx: LayoutTypeMethods<'tcx>>(self, cx: &Cx) -> PlaceRef<'tcx, V>[src]
pub fn immediate_or_packed_pair<Bx: BuilderMethods<'a, 'tcx, Value = V>>(
self,
bx: &mut Bx
) -> V[src]
pub fn immediate_or_packed_pair<Bx: BuilderMethods<'a, 'tcx, Value = V>>(
self,
bx: &mut Bx
) -> V[src]If this operand is a Pair, we return an aggregate with the two values.
For other cases, see immediate.
pub fn from_immediate_or_packed_pair<Bx: BuilderMethods<'a, 'tcx, Value = V>>(
bx: &mut Bx,
llval: V,
layout: TyAndLayout<'tcx>
) -> Self[src]
pub fn from_immediate_or_packed_pair<Bx: BuilderMethods<'a, 'tcx, Value = V>>(
bx: &mut Bx,
llval: V,
layout: TyAndLayout<'tcx>
) -> Self[src]If the type is a pair, we return a Pair, otherwise, an Immediate.
pub fn extract_field<Bx: BuilderMethods<'a, 'tcx, Value = V>>(
&self,
bx: &mut Bx,
i: usize
) -> Self[src]
&self,
bx: &mut Bx,
i: usize
) -> Self
Trait Implementations
impl<'tcx, V: Clone> Clone for OperandRef<'tcx, V>[src]
impl<'tcx, V: Clone> Clone for OperandRef<'tcx, V>[src]fn clone(&self) -> OperandRef<'tcx, V>[src]
fn clone(&self) -> OperandRef<'tcx, V>[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl<V: CodegenObject, 'tcx> Debug for OperandRef<'tcx, V>[src]
impl<V: CodegenObject, 'tcx> Debug for OperandRef<'tcx, V>[src]impl<'tcx, V: Copy> Copy for OperandRef<'tcx, V>[src]
Auto Trait Implementations
impl<'tcx, V> !RefUnwindSafe for OperandRef<'tcx, V>
impl<'tcx, V> !Send for OperandRef<'tcx, V>
impl<'tcx, V> !Sync for OperandRef<'tcx, V>
impl<'tcx, V> Unpin for OperandRef<'tcx, V> where
V: Unpin,
V: Unpin,
impl<'tcx, V> !UnwindSafe for OperandRef<'tcx, V>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more