Enum llvm_ir::terminator::Terminator
source · [−]pub enum Terminator {
Ret(Ret),
Br(Br),
CondBr(CondBr),
Switch(Switch),
IndirectBr(IndirectBr),
Invoke(Invoke),
Resume(Resume),
Unreachable(Unreachable),
CleanupRet(CleanupRet),
CatchRet(CatchRet),
CatchSwitch(CatchSwitch),
CallBr(CallBr),
}
Expand description
Terminator instructions end a basic block. See LLVM 14 docs on Terminator Instructions
Variants
Ret(Ret)
Br(Br)
CondBr(CondBr)
Switch(Switch)
IndirectBr(IndirectBr)
Invoke(Invoke)
Resume(Resume)
Unreachable(Unreachable)
CleanupRet(CleanupRet)
CatchRet(CatchRet)
CatchSwitch(CatchSwitch)
CallBr(CallBr)
Trait Implementations
sourceimpl Clone for Terminator
impl Clone for Terminator
sourcefn clone(&self) -> Terminator
fn clone(&self) -> Terminator
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Terminator
impl Debug for Terminator
sourceimpl Display for Terminator
impl Display for Terminator
sourceimpl From<Br> for Terminator
impl From<Br> for Terminator
sourcefn from(term: Br) -> Terminator
fn from(term: Br) -> Terminator
Converts to this type from the input type.
sourceimpl From<CallBr> for Terminator
impl From<CallBr> for Terminator
sourcefn from(term: CallBr) -> Terminator
fn from(term: CallBr) -> Terminator
Converts to this type from the input type.
sourceimpl From<CatchRet> for Terminator
impl From<CatchRet> for Terminator
sourcefn from(term: CatchRet) -> Terminator
fn from(term: CatchRet) -> Terminator
Converts to this type from the input type.
sourceimpl From<CatchSwitch> for Terminator
impl From<CatchSwitch> for Terminator
sourcefn from(term: CatchSwitch) -> Terminator
fn from(term: CatchSwitch) -> Terminator
Converts to this type from the input type.
sourceimpl From<CleanupRet> for Terminator
impl From<CleanupRet> for Terminator
sourcefn from(term: CleanupRet) -> Terminator
fn from(term: CleanupRet) -> Terminator
Converts to this type from the input type.
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 From<IndirectBr> for Terminator
impl From<IndirectBr> for Terminator
sourcefn from(term: IndirectBr) -> Terminator
fn from(term: IndirectBr) -> Terminator
Converts to this type from the input type.
sourceimpl From<Invoke> for Terminator
impl From<Invoke> for Terminator
sourcefn from(term: Invoke) -> Terminator
fn from(term: Invoke) -> Terminator
Converts to this type from the input type.
sourceimpl From<Resume> for Terminator
impl From<Resume> for Terminator
sourcefn from(term: Resume) -> Terminator
fn from(term: Resume) -> Terminator
Converts to this type from the input type.
sourceimpl From<Ret> for Terminator
impl From<Ret> for Terminator
sourcefn from(term: Ret) -> Terminator
fn from(term: Ret) -> Terminator
Converts to this type from the input type.
sourceimpl From<Switch> for Terminator
impl From<Switch> for Terminator
sourcefn from(term: Switch) -> Terminator
fn from(term: Switch) -> Terminator
Converts to this type from the input type.
sourceimpl From<Unreachable> for Terminator
impl From<Unreachable> for Terminator
sourcefn from(term: Unreachable) -> Terminator
fn from(term: Unreachable) -> Terminator
Converts to this type from the input type.
sourceimpl HasDebugLoc for Terminator
impl HasDebugLoc for Terminator
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<Terminator> for Terminator
impl PartialEq<Terminator> for Terminator
sourcefn eq(&self, other: &Terminator) -> bool
fn eq(&self, other: &Terminator) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl TryFrom<Terminator> for Br
impl TryFrom<Terminator> for Br
sourceimpl TryFrom<Terminator> for CallBr
impl TryFrom<Terminator> for CallBr
sourceimpl TryFrom<Terminator> for CatchRet
impl TryFrom<Terminator> for CatchRet
sourceimpl TryFrom<Terminator> for CatchSwitch
impl TryFrom<Terminator> for CatchSwitch
sourceimpl TryFrom<Terminator> for CleanupRet
impl TryFrom<Terminator> for CleanupRet
sourceimpl TryFrom<Terminator> for CondBr
impl TryFrom<Terminator> for CondBr
sourceimpl TryFrom<Terminator> for IndirectBr
impl TryFrom<Terminator> for IndirectBr
sourceimpl TryFrom<Terminator> for Invoke
impl TryFrom<Terminator> for Invoke
sourceimpl TryFrom<Terminator> for Resume
impl TryFrom<Terminator> for Resume
sourceimpl TryFrom<Terminator> for Ret
impl TryFrom<Terminator> for Ret
sourceimpl TryFrom<Terminator> for Switch
impl TryFrom<Terminator> for Switch
sourceimpl TryFrom<Terminator> for Unreachable
impl TryFrom<Terminator> for Unreachable
sourceimpl Typed for Terminator
impl Typed for Terminator
The Type
of a Terminator
is its result type.
For most terminators, this is VoidType
.
For instance, a Ret
instruction has void type even if
the function returns a non-void value; we do not store the result of a Ret
instruction using something like %3 = ret i32 %2
.
See LLVM 14 docs on Terminator Instructions
impl StructuralPartialEq for Terminator
Auto Trait Implementations
impl RefUnwindSafe for Terminator
impl Send for Terminator
impl Sync for Terminator
impl Unpin for Terminator
impl UnwindSafe for Terminator
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