Struct GlobalValue

Source
pub struct GlobalValue<T: TypeTag> { /* private fields */ }

Implementations§

Source§

impl<T: TypeTag> GlobalValue<T>

Source

pub fn get_global_parent(&self) -> &Module<'_>

Source

pub fn is_declaration(&self) -> bool

Source

pub fn get_linkage(&self) -> LLVMLinkage

Source

pub fn set_linkage(&self, linkage: LLVMLinkage)

Source

pub fn get_section(&self) -> &CStr

Source

pub fn set_section(&self, section: &CStr)

Source

pub fn get_visibility(&self) -> LLVMVisibility

Source

pub fn set_visibility(&self, viz: LLVMVisibility)

Source

pub fn get_dll_storage_class(&self) -> LLVMDLLStorageClass

Source

pub fn set_dll_storage_class(&self, class: LLVMDLLStorageClass)

Source

pub fn get_unnamed_address(&self) -> LLVMUnnamedAddr

Source

pub fn set_unnamed_address(&self, unnamed_addr: LLVMUnnamedAddr)

Source

pub fn get_value_type(&self) -> &Type<T>

Source§

impl<T: TypeTag> GlobalValue<T>

Source

pub fn set_metadata(&self, kind: u32, md: &Metadata)

Source

pub fn erase_metadata(&self, kind: u32)

Source

pub fn clear_metadata(&self)

Source

pub fn copy_all_metadata(&self) -> ValueMetadataEntries<'_>

Source§

impl<T: TypeTag> GlobalValue<T>

Source

pub fn get_next_global(&self) -> &GlobalValue<any>

Source

pub fn get_previous_global(&self) -> &GlobalValue<any>

Source

pub unsafe fn delete_global(&self)

Source

pub fn get_initializer(&self) -> Option<&Constant<T>>

Source

pub fn set_initializer(&self, constant_val: Option<&Constant<T>>)

Source

pub fn is_thread_local(&self) -> bool

Source

pub fn set_thread_local(&self, is_thread_local: bool)

Source

pub fn is_global_constant(&self) -> bool

Source

pub fn set_global_constant(&self, is_constant: bool)

Source

pub fn get_thread_local_mode(&self) -> LLVMThreadLocalMode

Source

pub fn set_thread_local_mode(&self, mode: LLVMThreadLocalMode)

Source

pub fn is_externally_initialized(&self) -> bool

Source

pub fn set_externally_initialized(&self, is_ext_init: bool)

Source§

impl<T: TypeTag> GlobalValue<T>

Source

pub fn to_any(&self) -> &GlobalValue<any>

Methods from Deref<Target = Constant<ptr_any>>§

Source

pub fn get_z_ext_value(&self) -> u64

Source

pub fn get_s_ext_value(&self) -> i64

Source

pub fn get_double(&self) -> (f64, bool)

Source

pub fn is_constant_string(&self) -> bool

Source

pub fn get_as_string(&self) -> &[u8]

Source

pub fn get_aggregate_element(&self, idx: u32) -> &Value<any>

Source

pub fn get_const_opcode(&self) -> LLVMOpcode

Source

pub fn const_neg(&self) -> &Constant<T>

Source

pub fn const_nsw_neg(&self) -> &Constant<T>

Source

pub fn const_nuw_neg(&self) -> &Constant<T>

Source

pub fn const_not(&self) -> &Constant<T>

Source

pub fn const_add(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_nsw_add(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_nuw_add(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_sub(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_nsw_sub(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_nuw_sub(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_mul(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_nsw_mul(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_nuw_mul(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_xor(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_shl(&self, rhs: &Self) -> &Constant<T>

Source

pub fn const_trunc<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>

Source

pub fn const_ptr_to_int<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>

Source

pub fn const_int_to_ptr<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>

Source

pub fn const_bit_cast<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>

Source

pub fn const_addr_space_cast<D: TypeTag>( &self, to_type: &Type<D>, ) -> &Constant<D>

Source

pub fn const_trunc_or_bit_cast<D: TypeTag>( &self, to_type: &Type<D>, ) -> &Constant<D>

Source

pub fn const_pointer_cast<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>

Source

pub fn const_extract_element<I: IntTypeTag>( &self, index_constant: &Constant<I>, ) -> &Constant<any>

Source

pub fn const_insert_element<E: TypeTag, I: IntTypeTag>( &self, element_value_constant: &Constant<E>, index_constant: &Constant<I>, ) -> &Constant<any>

Source

pub fn const_shuffle_vector( &self, vector_b_constant: &Self, mask_constant: &Self, ) -> &Constant<any>
where T: VectorTypeTag,

Source

pub fn block_address(&self, bb: &BasicBlock) -> &Constant<any>
where T: FunTypeTag,

Source

pub fn to_any(&self) -> &Constant<any>

Methods from Deref<Target = Value<T>>§

Source

pub fn get_comdat(&self) -> &Comdat

Source

pub fn set_comdat(&self, c: &Comdat)

Source

pub fn is_basic_block(&self) -> bool

Source

pub fn get_parent_catch_switch(&self) -> &Value<any>

Source

pub fn set_parent_catch_switch(&self, catch_switch: &Value<any>)

Source

pub fn get_next_global_i_func(&self) -> Option<&Value<any>>

Source

pub fn get_previous_global_i_func(&self) -> Option<&Value<any>>

Source

pub fn get_global_i_func_resolver(&self) -> Option<&Value<any>>

Source

pub fn set_global_i_func_resolver<S: TypeTag>( &self, resolver: Option<&Value<S>>, )

Source

pub fn erase_global_i_func(&self)

Source

pub fn remove_global_i_func(&self)

Source

pub fn get_inline_asm_constrain_string(&self) -> &[u8]

Source

pub fn get_inline_asm_dialect(&self) -> LLVMInlineAsmDialect

Source

pub fn get_inline_asm_function_type(&self) -> &Type<T>

Source

pub fn get_inline_asm_has_side_effects(&self) -> bool

Source

pub fn get_inline_asm_needs_aligned_stack(&self) -> bool

Source

pub fn get_inline_asm_can_unwind(&self) -> bool

Source

pub fn get_debug_loc_director(&self) -> &[u8]

Source

pub fn get_debug_loc_filename(&self) -> &[u8]

Source

pub fn get_debug_loc_line(&self) -> u32

Source

pub fn get_debug_loc_column(&self) -> u32

Source

pub fn is_null(&self) -> bool

Source

pub fn get_alignment(&self) -> u32

Source

pub fn set_alignment(&self, bytes: u32)

Source

pub fn get_first_use(&self) -> Option<&Use>

Source

pub fn get_operand(&self, index: u32) -> Option<&Value<any>>

Source

pub fn get_operand_use(&self, index: u32) -> Option<&Use>

Source

pub fn set_operand<O: TypeTag>(&self, index: u32, val: &Value<O>)

Source

pub fn get_num_operands(&self) -> i32

Source

pub fn to_any(&self) -> &Value<any>

Source

pub fn get_kind(&self) -> LLVMValueKind

Source

pub fn get_type(&self) -> &Type<T>

Obtain the type of a value.

Source

pub fn get_name(&self) -> &[u8]

Obtain the string name of a value.

Source

pub fn set_name(&self, name: &[u8])

Set the string name of a value.

Source

pub fn dump(&self)

Source

pub fn print_to_string(&self) -> Message

Return a string representation of the value.

Source

pub fn replace_all_uses_with(&self, new: &Self)
where T: InstanceTypeTag,

Source

pub fn is_constant(&self) -> bool

Determine whether the specified value instance is constant.

Source

pub fn is_undef(&self) -> bool

Determine whether a value instance is undefined.

Source

pub fn is_poison(&self) -> bool

Determine whether a value instance is poisonous.

Source

pub fn is_a_metadata_node(&self) -> Option<&Value<metadata>>

Source

pub fn is_a_value_as_metadata(&self) -> Option<&Value<metadata>>

Source

pub fn is_a_metadata_string(&self) -> Option<&Value<metadata>>

Source

pub fn is_a_argument(&self) -> Option<&Argument<T>>

Source

pub fn is_a_basic_block(&self) -> Option<&Value<T>>

Source

pub fn is_a_inline_asm(&self) -> Option<&Value<T>>

Source

pub fn is_a_user(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant(&self) -> Option<&Constant<T>>

Source

pub fn is_a_block_address(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_aggregate_zero(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_array(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_data_sequential(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_data_array(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_data_vector(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_expr(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_fp(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_int(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_pointer_null(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_struct(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_token_none(&self) -> Option<&Value<T>>

Source

pub fn is_a_constant_vector(&self) -> Option<&Value<T>>

Source

pub fn is_a_global_value(&self) -> Option<&GlobalValue<any>>

Source

pub fn is_a_global_alias(&self) -> Option<&GlobalAlias<any>>

Source

pub fn is_a_global_i_func(&self) -> Option<&Value<T>>

Source

pub fn is_a_global_object(&self) -> Option<&Value<T>>

Source

pub fn is_a_function(&self) -> Option<&Function<T>>
where T: FunTypeTag,

Source

pub fn is_a_global_variable(&self) -> Option<&Value<T>>

Source

pub fn is_a_undef_value(&self) -> Option<&Value<T>>

Source

pub fn is_a_poison_value(&self) -> Option<&Value<T>>

Source

pub fn is_a_instruction(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_unary_operator(&self) -> Option<&Value<T>>

Source

pub fn is_a_binary_operator(&self) -> Option<&Value<T>>

Source

pub fn is_a_call_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_intrinsic_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_dbg_info_intrinsic(&self) -> Option<&Value<T>>

Source

pub fn is_a_dbg_variable_intrinsic(&self) -> Option<&Value<T>>

Source

pub fn is_a_dbg_declare_inst(&self) -> Option<&Value<T>>

Source

pub fn is_a_dbg_label_inst(&self) -> Option<&Value<T>>

Source

pub fn is_a_mem_intrinsic(&self) -> Option<&Value<T>>

Source

pub fn is_a_mem_cpy_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_mem_move_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_mem_set_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_cmp_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_f_cmp_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_i_cmp_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_extract_element_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_get_element_ptr_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_insert_element_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_insert_value_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_landing_pad_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_phi_node(&self) -> Option<&Value<T>>

Source

pub fn is_a_select_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_shuffle_vector_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_store_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_branch_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_indirect_br_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_invoke_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_return_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_switch_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_unreachable_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_resume_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_cleanup_return_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_catch_return_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_catch_switch_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_call_br_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_funclet_pad_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_catch_pad_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_cleanup_pad_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_unary_instruction(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_alloca_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_cast_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_addr_space_cast_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_bit_cast_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_fp_ext_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_fp_to_si_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_fp_to_ui_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_fp_trunc_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_int_to_ptr_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_ptr_to_int_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_s_ext_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_si_to_fp_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_trunc_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_ui_to_fp_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_z_ext_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_extract_value_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_load_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_va_arg_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_freeze_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_atomic_cmp_xchg_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_atomic_rmw_inst(&self) -> Option<&Instruction<T>>

Source

pub fn is_a_fence_inst(&self) -> Option<&Instruction<T>>

Source

pub fn get_num_indices(&self) -> u32

Source

pub fn get_indices(&self) -> &[u32]

Trait Implementations§

Source§

impl<T: TypeTag> Debug for GlobalValue<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: TypeTag> Deref for GlobalValue<T>

Source§

type Target = Constant<ptr_any>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T: TypeTag> Opaque for GlobalValue<T>

Source§

type Inner = LLVMValue

Source§

unsafe fn try_from_raw<'a>(ptr: *mut Self::Inner) -> Option<&'a Self>

Try to create ref from nonnull raw pointer and check cond.
Source§

unsafe fn from_raw<'r>(ptr: *mut Self::Inner) -> &'r Self

Try to create ref from nonnull raw pointer but don’t check cond.
Source§

unsafe fn from_ptr<'r>(ptr: *mut Self::Inner) -> Option<&'r Self>

Try to create ref from nullable raw pointer.
Source§

fn as_raw(&self) -> *mut Self::Inner

Get raw pointer.
Source§

unsafe fn cast_unchecked<T: Opaque<Inner = Self::Inner>>(&self) -> &T

Cast to target but don’t check cond.
Source§

fn cast<T: Opaque<Inner = Self::Inner>>(&self) -> &T

Source§

fn try_cast<T: Opaque<Inner = Self::Inner>>(&self) -> Option<&T>

Cast to target and check cond.

Auto Trait Implementations§

§

impl<T> !Freeze for GlobalValue<T>

§

impl<T> !RefUnwindSafe for GlobalValue<T>

§

impl<T> Send for GlobalValue<T>

§

impl<T> !Sync for GlobalValue<T>

§

impl<T> !Unpin for GlobalValue<T>

§

impl<T> UnwindSafe for GlobalValue<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.