Struct llvm_rs::value::GlobalVariable
source · pub struct GlobalVariable(_);Expand description
A global variable
Implementations§
source§impl GlobalVariable
impl GlobalVariable
sourcepub fn set_initializer(&self, val: &Value)
pub fn set_initializer(&self, val: &Value)
Set the initial value of the global
sourcepub fn get_initializer(&self) -> Option<&Value>
pub fn get_initializer(&self) -> Option<&Value>
Set the initial value of the global
sourcepub fn set_constant(&self, is_constant: bool)
pub fn set_constant(&self, is_constant: bool)
Set whether this global is a constant.
sourcepub fn get_constant(&self) -> bool
pub fn get_constant(&self) -> bool
Returns true if this global is a constant.
Methods from Deref<Target = GlobalValue>§
sourcepub fn set_linkage(&self, linkage: Linkage)
pub fn set_linkage(&self, linkage: Linkage)
Set the linkage type for this global
sourcepub fn get_linkage(&self) -> Linkage
pub fn get_linkage(&self) -> Linkage
Returns the linkage type for this global
sourcepub fn is_declaration(&self) -> bool
pub fn is_declaration(&self) -> bool
Returns true if this global is a declaration (as opposed to a definition).
Methods from Deref<Target = Value>§
Trait Implementations§
source§impl Debug for GlobalVariable
impl Debug for GlobalVariable
source§impl Deref for GlobalVariable
impl Deref for GlobalVariable
§type Target = GlobalValue
type Target = GlobalValue
The resulting type after dereferencing.
source§fn deref(&self) -> &GlobalValue
fn deref(&self) -> &GlobalValue
Dereferences the value.
source§impl<'a> From<&'a GlobalVariable> for LLVMValueRef
impl<'a> From<&'a GlobalVariable> for LLVMValueRef
source§fn from(ty: &'a GlobalVariable) -> LLVMValueRef
fn from(ty: &'a GlobalVariable) -> LLVMValueRef
Converts to this type from the input type.
source§impl<'a> From<&'a mut GlobalVariable> for LLVMValueRef
impl<'a> From<&'a mut GlobalVariable> for LLVMValueRef
source§fn from(ty: &'a mut GlobalVariable) -> LLVMValueRef
fn from(ty: &'a mut GlobalVariable) -> LLVMValueRef
Converts to this type from the input type.
source§impl<'a> From<*mut LLVMValue> for &'a GlobalVariable
impl<'a> From<*mut LLVMValue> for &'a GlobalVariable
source§fn from(ty: LLVMValueRef) -> &'a GlobalVariable
fn from(ty: LLVMValueRef) -> &'a GlobalVariable
Converts to this type from the input type.
source§impl<'a> From<*mut LLVMValue> for &'a mut GlobalVariable
impl<'a> From<*mut LLVMValue> for &'a mut GlobalVariable
source§fn from(ty: LLVMValueRef) -> &'a mut GlobalVariable
fn from(ty: LLVMValueRef) -> &'a mut GlobalVariable
Converts to this type from the input type.
source§impl<'a> PartialEq<GlobalVariable> for &'a GlobalVariable
impl<'a> PartialEq<GlobalVariable> for &'a GlobalVariable
source§fn eq(&self, other: &GlobalVariable) -> bool
fn eq(&self, other: &GlobalVariable) -> bool
source§impl PartialEq<GlobalVariable> for GlobalVariable
impl PartialEq<GlobalVariable> for GlobalVariable
source§fn eq(&self, other: &GlobalVariable) -> bool
fn eq(&self, other: &GlobalVariable) -> bool
source§impl Sub<GlobalValue> for GlobalVariable
impl Sub<GlobalValue> for GlobalVariable
source§fn is(value: &GlobalValue) -> bool
fn is(value: &GlobalValue) -> bool
Check if the given super value is an instance of this type.
source§fn from_super(value: &GlobalValue) -> Option<&GlobalVariable>
fn from_super(value: &GlobalValue) -> Option<&GlobalVariable>
Attempt to cast the given super value into an instance of this type.