pub struct Pointer(pub Index);
Tuple Fields§
§0: Index
Implementations§
source§impl Pointer
impl Pointer
sourcepub fn as_string(&self, context: &Context, name: Option<&str>) -> String
pub fn as_string(&self, context: &Context, name: Option<&str>) -> String
Return a string representation of type, used for IR printing.
sourcepub fn new(
context: &mut Context,
ty: Type,
is_mutable: bool,
initializer: Option<Constant>
) -> Self
pub fn new(
context: &mut Context,
ty: Type,
is_mutable: bool,
initializer: Option<Constant>
) -> Self
Return a new pointer to 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 pointed to by this pointer.
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 pointer.
sourcepub fn is_mutable(&self, context: &Context) -> bool
pub fn is_mutable(&self, context: &Context) -> bool
Return whether the pointer is to a mutable value.
sourcepub fn is_aggregate_ptr(&self, context: &Context) -> bool
pub fn is_aggregate_ptr(&self, context: &Context) -> bool
Return whether this pointer is to a Type::Struct
in particular.