[][src]Enum llhd::ir::ModUnitData

pub enum ModUnitData {
    Function(Function),
    Process(Process),
    Entity(Entity),
    Declare {
        sig: Signature,
        name: UnitName,
    },
}

Internal table storage for units in a module.

Variants

Function(Function)

The unit is a function.

Process(Process)

The unit is a process.

Entity(Entity)

The unit is an entity.

Declare

The unit is a declaration of an external unit.

Fields of Declare

sig: Signaturename: UnitName

Methods

impl ModUnitData[src]

pub fn get_function(&self) -> Option<&Function>[src]

If this unit is a function, return it. Otherwise return None.

pub fn get_function_mut(&mut self) -> Option<&mut Function>[src]

If this unit is a function, return it. Otherwise return None.

pub fn get_process(&self) -> Option<&Process>[src]

If this unit is a process, return it. Otherwise return None.

pub fn get_process_mut(&mut self) -> Option<&mut Process>[src]

If this unit is a process, return it. Otherwise return None.

pub fn get_entity(&self) -> Option<&Entity>[src]

If this unit is an entity, return it. Otherwise return None.

pub fn get_entity_mut(&mut self) -> Option<&mut Entity>[src]

If this unit is an entity, return it. Otherwise return None.

pub fn get_declaration(&self) -> Option<(&UnitName, &Signature)>[src]

If this unit is an external declaration, return it. Otherwise return None.

pub fn get_declaration_mut(&mut self) -> Option<(&mut UnitName, &mut Signature)>[src]

If this unit is an external declaration, return it. Otherwise return None.

pub fn is_function(&self) -> bool[src]

Check whether this is a function.

pub fn is_process(&self) -> bool[src]

Check whether this is a process.

pub fn is_entity(&self) -> bool[src]

Check whether this is an entity.

pub fn is_declaration(&self) -> bool[src]

Check whether this is a declaration of an external unit.

pub fn sig(&self) -> &Signature[src]

Return the signature of the unit.

pub fn name(&self) -> &UnitName[src]

Return the name of the unit.

pub fn get_dfg(&self) -> Option<&DataFlowGraph>[src]

Return the data flow graph of the unit, if there is one.

pub fn get_dfg_mut(&mut self) -> Option<&mut DataFlowGraph>[src]

Return the mutable data flow graph of the unit, if there is one.

Auto Trait Implementations

Blanket Implementations

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

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

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.

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

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

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