Struct llvm_ir::terminator::CondBr
source · [−]pub struct CondBr {
pub condition: Operand,
pub true_dest: Name,
pub false_dest: Name,
pub debugloc: Option<DebugLoc>,
}
Expand description
See LLVM 14 docs on the ‘br’ instruction.
The LLVM ‘br’ instruction has both conditional and unconditional variants, which we separate – this is
the conditional variant, while the unconditional variant is Br
.
Fields
condition: Operand
The branch condition.
true_dest: Name
The Name
of the BasicBlock
destination if the condition
is true.
false_dest: Name
The Name
of the BasicBlock
destination if the condition
is false.
debugloc: Option<DebugLoc>
Trait Implementations
sourceimpl From<CondBr> for Terminator
impl From<CondBr> for Terminator
sourcefn from(term: CondBr) -> Terminator
fn from(term: CondBr) -> Terminator
Converts to this type from the input type.
sourceimpl HasDebugLoc for CondBr
impl HasDebugLoc for CondBr
sourcefn get_debug_loc(&self) -> &Option<DebugLoc>
fn get_debug_loc(&self) -> &Option<DebugLoc>
Returns the DebugLoc
associated with the given Instruction
,
Terminator
, GlobalVariable
, or Function
; or None
if it doesn’t
have a DebugLoc
. Read more
sourceimpl PartialEq<CondBr> for CondBr
impl PartialEq<CondBr> for CondBr
sourceimpl TryFrom<Terminator> for CondBr
impl TryFrom<Terminator> for CondBr
impl StructuralPartialEq for CondBr
Auto Trait Implementations
impl RefUnwindSafe for CondBr
impl Send for CondBr
impl Sync for CondBr
impl Unpin for CondBr
impl UnwindSafe for CondBr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more