Struct llvm::GlobalVariable [] [src]

pub struct GlobalVariable;

A global variable

Methods

impl GlobalVariable
[src]

fn set_initializer(&self, val: &Value)

Set the initial value of the global

fn get_initializer(&self) -> Option<&Value>

Set the initial value of the global

fn set_constant(&self, is_constant: bool)

Set whether this global is a constant.

fn get_constant(&self) -> bool

Returns true if this global is a constant.

Methods from Deref<Target=GlobalValue>

fn set_linkage(&self, linkage: Linkage)

Set the linkage type for this global

fn get_linkage(&self) -> Linkage

Returns the linkage type for this global

fn is_declaration(&self) -> bool

Returns true if this global is a declaration (as opposed to a definition).

Trait Implementations

impl Eq for GlobalVariable
[src]

impl PartialEq<GlobalVariable> for GlobalVariable
[src]

fn eq(&self, other: &GlobalVariable) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl<'a> PartialEq<GlobalVariable> for &'a GlobalVariable
[src]

fn eq(&self, other: &GlobalVariable) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl<'a> From<LLVMValueRef> for &'a GlobalVariable
[src]

fn from(ty: LLVMValueRef) -> &'a GlobalVariable

Performs the conversion.

impl<'a> From<LLVMValueRef> for &'a mut GlobalVariable
[src]

fn from(ty: LLVMValueRef) -> &'a mut GlobalVariable

Performs the conversion.

impl Sub<GlobalValue> for GlobalVariable
[src]

fn is(value: &GlobalValue) -> bool

Check if the given super value is an instance of this type.

fn from_super(value: &GlobalValue) -> Option<&GlobalVariable>

Attempt to cast the given super value into an instance of this type.

fn to_super(&self) -> &T

Cast this value to a super value.

impl Deref for GlobalVariable
[src]

type Target = GlobalValue

The resulting type after dereferencing

fn deref(&self) -> &GlobalValue

The method called to dereference a value