[][src]Struct inkwell::values::GlobalValue

pub struct GlobalValue { /* fields omitted */ }

Methods

impl GlobalValue[src]

pub fn get_previous_global(&self) -> Option<GlobalValue>[src]

pub fn get_next_global(&self) -> Option<GlobalValue>[src]

pub fn get_dll_storage_class(&self) -> DLLStorageClass[src]

pub fn set_dll_storage_class(&self, dll_storage_class: DLLStorageClass)[src]

pub fn get_initializer(&self) -> Option<BasicValueEnum>[src]

pub fn set_initializer(&self, value: &dyn BasicValue)[src]

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

pub fn set_thread_local(&self, is_thread_local: bool)[src]

pub fn get_thread_local_mode(&self) -> Option<ThreadLocalMode>[src]

pub fn set_thread_local_mode(&self, thread_local_mode: Option<ThreadLocalMode>)[src]

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

Determines whether or not a GlobalValue is a declaration or a definition.

Example

use inkwell::context::Context;

let context = Context::create();
let builder = context.create_builder();
let module = context.create_module("my_mod");
let void_type = context.void_type();
let fn_type = void_type.fn_type(&[], false);
let fn_value = module.add_function("my_func", fn_type, None);

assert!(fn_value.as_global_value().is_declaration());

fn_value.append_basic_block("entry");

assert!(!fn_value.as_global_value().is_declaration());

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

pub fn set_unnamed_addr(&self, has_unnamed_addr: bool)[src]

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

pub fn set_constant(&self, is_constant: bool)[src]

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

pub fn set_externally_initialized(&self, externally_initialized: bool)[src]

pub fn set_visibility(&self, visibility: GlobalVisibility)[src]

pub fn get_visibility(&self) -> GlobalVisibility[src]

pub fn get_section(&self) -> &CStr[src]

pub fn set_section(&self, section: &str)[src]

pub unsafe fn delete(self)[src]

pub fn as_pointer_value(&self) -> PointerValue[src]

pub fn get_alignment(&self) -> u32[src]

pub fn set_alignment(&self, alignment: u32)[src]

pub fn get_comdat(&self) -> Option<Comdat>[src]

Gets a Comdat assigned to this GlobalValue, if any.

pub fn set_comdat(&self, comdat: Comdat)[src]

Assigns a Comdat to this GlobalValue.

pub fn get_unnamed_address(&self) -> UnnamedAddress[src]

pub fn set_unnamed_address(&self, address: UnnamedAddress)[src]

pub fn get_linkage(&self) -> Linkage[src]

pub fn set_linkage(&self, linkage: Linkage)[src]

pub fn print_to_string(&self) -> LLVMString[src]

Trait Implementations

impl BasicValue for GlobalValue[src]

impl AnyValue for GlobalValue[src]

impl Eq for GlobalValue[src]

impl Clone for GlobalValue[src]

impl PartialEq<GlobalValue> for GlobalValue[src]

impl Copy for GlobalValue[src]

impl Hash for GlobalValue[src]

impl Debug for GlobalValue[src]

Auto Trait Implementations

impl !Sync for GlobalValue

impl !Send for GlobalValue

impl Unpin for GlobalValue

impl UnwindSafe for GlobalValue

impl RefUnwindSafe for GlobalValue

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for 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]