[−][src]Struct rustc_codegen_ssa::mir::operand::OperandRef
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]
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]
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]
self,
bx: &mut Bx
) -> V
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]
bx: &mut Bx,
llval: V,
layout: TyAndLayout<'tcx>
) -> Self
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]
pub fn clone(&self) -> OperandRef<'tcx, V>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'tcx, V: Copy> Copy for OperandRef<'tcx, V>[src]
impl<V: CodegenObject, 'tcx> Debug 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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,