[][src]Enum gf::pivot::basic_block::Loc

pub enum Loc<'a> {
    Stmt(Stmt<'a>),
    Tail(BasicBlock<'a>),
}

🟢 Location in a sealed basic block.

Variants

Stmt(Stmt<'a>)

The location is at a statement.

Tail(BasicBlock<'a>)

The location is at the tail of a basic block.

Implementations

impl<'a> Loc<'a>[src]

pub unsafe fn from_unsealed(module: &'a Module, unsealed: UnsealedLoc) -> Self[src]

Wrap an unsealed location.

pub fn at_entry_of(fragment: Fragment<'a>) -> Self[src]

Return location at the entry of a fragment.

pub fn at_exit_of(fragment: Fragment<'a>) -> Self[src]

Return location at the exit of a fragment.

pub fn at_start_of(basic_block: BasicBlock<'a>) -> Self[src]

Return location at the start of a basic block.

pub fn at_end_of(basic_block: BasicBlock<'a>) -> Self[src]

Return location at the end of a basic block.

pub fn module(&self) -> &'a Module[src]

Return parent module.

pub fn fragment(&self) -> Fragment<'a>[src]

Return parent fragment.

pub fn basic_block(&self) -> BasicBlock<'a>[src]

Return parent basic block.

pub fn stmt(&self) -> Option<Stmt<'a>>[src]

Return statement, None for a tail location.

pub fn next(&self) -> Option<Self>[src]

Return next location.

pub fn prev(&self) -> Option<Self>[src]

Return previous location.

Trait Implementations

impl<'a> Clone for Loc<'a>[src]

impl<'a> Copy for Loc<'a>[src]

impl<'a> Eq for Loc<'a>[src]

impl<'a> Hash for Loc<'a>[src]

impl<'a> PartialEq<Loc<'a>> for Loc<'a>[src]

impl<'a> StructuralEq for Loc<'a>[src]

impl<'a> StructuralPartialEq for Loc<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Loc<'a>

impl<'a> Send for Loc<'a>

impl<'a> Sync for Loc<'a>

impl<'a> Unpin for Loc<'a>

impl<'a> UnwindSafe for Loc<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.