Enum llvm_ir::instruction::groups::BinaryOp
source · pub enum BinaryOp {
}
Expand description
Just the BinaryOps. This ends up being better than a &dyn
BinaryOp
for various reasons.
Variants§
Add(Add)
Sub(Sub)
Mul(Mul)
UDiv(UDiv)
SDiv(SDiv)
URem(URem)
SRem(SRem)
And(And)
Or(Or)
Xor(Xor)
Shl(Shl)
LShr(LShr)
AShr(AShr)
FAdd(FAdd)
FSub(FSub)
FMul(FMul)
FDiv(FDiv)
FRem(FRem)
Trait Implementations§
source§impl BinaryOp for BinaryOp
impl BinaryOp for BinaryOp
fn get_operand0(&self) -> &Operand
fn get_operand1(&self) -> &Operand
source§impl From<BinaryOp> for Instruction
impl From<BinaryOp> for Instruction
source§fn from(bo: BinaryOp) -> Instruction
fn from(bo: BinaryOp) -> Instruction
Converts to this type from the input type.
source§impl PartialEq for BinaryOp
impl PartialEq for BinaryOp
source§impl TryFrom<Instruction> for BinaryOp
impl TryFrom<Instruction> for BinaryOp
impl StructuralPartialEq for BinaryOp
Auto Trait Implementations§
impl Freeze for BinaryOp
impl RefUnwindSafe for BinaryOp
impl Send for BinaryOp
impl Sync for BinaryOp
impl Unpin for BinaryOp
impl UnwindSafe for BinaryOp
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more