pub struct LocalVar(pub Index);
Tuple Fields§
§0: Index
Implementations§
source§impl LocalVar
impl LocalVar
sourcepub fn new(context: &mut Context, ty: Type, initializer: Option<Constant>) -> Self
pub fn new(context: &mut Context, ty: Type, initializer: Option<Constant>) -> Self
Return a new local of a specific type with an optional Constant
initializer.
sourcepub fn get_type<'a>(&self, context: &'a Context) -> &'a Type
pub fn get_type<'a>(&self, context: &'a Context) -> &'a Type
Return the type of this local variable.
sourcepub fn get_initializer<'a>(&self, context: &'a Context) -> Option<&'a Constant>
pub fn get_initializer<'a>(&self, context: &'a Context) -> Option<&'a Constant>
Return the initializer for this local variable.