pub struct GlobalValue<T: TypeTag> { /* private fields */ }
Implementations§
Source§impl<T: TypeTag> GlobalValue<T>
impl<T: TypeTag> GlobalValue<T>
pub fn get_global_parent(&self) -> &Module<'_>
pub fn is_declaration(&self) -> bool
pub fn get_linkage(&self) -> LLVMLinkage
pub fn set_linkage(&self, linkage: LLVMLinkage)
pub fn get_section(&self) -> &CStr
pub fn set_section(&self, section: &CStr)
pub fn get_visibility(&self) -> LLVMVisibility
pub fn set_visibility(&self, viz: LLVMVisibility)
pub fn get_dll_storage_class(&self) -> LLVMDLLStorageClass
pub fn set_dll_storage_class(&self, class: LLVMDLLStorageClass)
pub fn get_unnamed_address(&self) -> LLVMUnnamedAddr
pub fn set_unnamed_address(&self, unnamed_addr: LLVMUnnamedAddr)
pub fn get_value_type(&self) -> &Type<T>
Source§impl<T: TypeTag> GlobalValue<T>
impl<T: TypeTag> GlobalValue<T>
pub fn set_metadata(&self, kind: u32, md: &Metadata)
pub fn erase_metadata(&self, kind: u32)
pub fn clear_metadata(&self)
pub fn copy_all_metadata(&self) -> ValueMetadataEntries<'_>
Source§impl<T: TypeTag> GlobalValue<T>
impl<T: TypeTag> GlobalValue<T>
pub fn get_next_global(&self) -> &GlobalValue<any>
pub fn get_previous_global(&self) -> &GlobalValue<any>
pub unsafe fn delete_global(&self)
pub fn get_initializer(&self) -> Option<&Constant<T>>
pub fn set_initializer(&self, constant_val: Option<&Constant<T>>)
pub fn is_thread_local(&self) -> bool
pub fn set_thread_local(&self, is_thread_local: bool)
pub fn is_global_constant(&self) -> bool
pub fn set_global_constant(&self, is_constant: bool)
pub fn get_thread_local_mode(&self) -> LLVMThreadLocalMode
pub fn set_thread_local_mode(&self, mode: LLVMThreadLocalMode)
pub fn is_externally_initialized(&self) -> bool
pub fn set_externally_initialized(&self, is_ext_init: bool)
Source§impl<T: TypeTag> GlobalValue<T>
impl<T: TypeTag> GlobalValue<T>
pub fn to_any(&self) -> &GlobalValue<any>
Methods from Deref<Target = Constant<ptr_any>>§
pub fn get_z_ext_value(&self) -> u64
pub fn get_s_ext_value(&self) -> i64
pub fn get_double(&self) -> (f64, bool)
pub fn is_constant_string(&self) -> bool
pub fn get_as_string(&self) -> &[u8] ⓘ
pub fn get_aggregate_element(&self, idx: u32) -> &Value<any>
pub fn get_const_opcode(&self) -> LLVMOpcode
pub fn const_neg(&self) -> &Constant<T>
pub fn const_nsw_neg(&self) -> &Constant<T>
pub fn const_nuw_neg(&self) -> &Constant<T>
pub fn const_not(&self) -> &Constant<T>
pub fn const_add(&self, rhs: &Self) -> &Constant<T>
pub fn const_nsw_add(&self, rhs: &Self) -> &Constant<T>
pub fn const_nuw_add(&self, rhs: &Self) -> &Constant<T>
pub fn const_sub(&self, rhs: &Self) -> &Constant<T>
pub fn const_nsw_sub(&self, rhs: &Self) -> &Constant<T>
pub fn const_nuw_sub(&self, rhs: &Self) -> &Constant<T>
pub fn const_mul(&self, rhs: &Self) -> &Constant<T>
pub fn const_nsw_mul(&self, rhs: &Self) -> &Constant<T>
pub fn const_nuw_mul(&self, rhs: &Self) -> &Constant<T>
pub fn const_xor(&self, rhs: &Self) -> &Constant<T>
pub fn const_shl(&self, rhs: &Self) -> &Constant<T>
pub fn const_trunc<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>
pub fn const_ptr_to_int<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>
pub fn const_int_to_ptr<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>
pub fn const_bit_cast<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>
pub fn const_addr_space_cast<D: TypeTag>( &self, to_type: &Type<D>, ) -> &Constant<D>
pub fn const_trunc_or_bit_cast<D: TypeTag>( &self, to_type: &Type<D>, ) -> &Constant<D>
pub fn const_pointer_cast<D: TypeTag>(&self, to_type: &Type<D>) -> &Constant<D>
pub fn const_extract_element<I: IntTypeTag>( &self, index_constant: &Constant<I>, ) -> &Constant<any>
pub fn const_insert_element<E: TypeTag, I: IntTypeTag>( &self, element_value_constant: &Constant<E>, index_constant: &Constant<I>, ) -> &Constant<any>
pub fn const_shuffle_vector(
&self,
vector_b_constant: &Self,
mask_constant: &Self,
) -> &Constant<any>where
T: VectorTypeTag,
pub fn block_address(&self, bb: &BasicBlock) -> &Constant<any>where
T: FunTypeTag,
pub fn to_any(&self) -> &Constant<any>
Methods from Deref<Target = Value<T>>§
pub fn get_comdat(&self) -> &Comdat
pub fn set_comdat(&self, c: &Comdat)
pub fn is_basic_block(&self) -> bool
pub fn get_parent_catch_switch(&self) -> &Value<any>
pub fn set_parent_catch_switch(&self, catch_switch: &Value<any>)
pub fn get_next_global_i_func(&self) -> Option<&Value<any>>
pub fn get_previous_global_i_func(&self) -> Option<&Value<any>>
pub fn get_global_i_func_resolver(&self) -> Option<&Value<any>>
pub fn set_global_i_func_resolver<S: TypeTag>( &self, resolver: Option<&Value<S>>, )
pub fn erase_global_i_func(&self)
pub fn remove_global_i_func(&self)
pub fn get_inline_asm_constrain_string(&self) -> &[u8] ⓘ
pub fn get_inline_asm_dialect(&self) -> LLVMInlineAsmDialect
pub fn get_inline_asm_function_type(&self) -> &Type<T>
pub fn get_inline_asm_has_side_effects(&self) -> bool
pub fn get_inline_asm_needs_aligned_stack(&self) -> bool
pub fn get_inline_asm_can_unwind(&self) -> bool
pub fn get_debug_loc_director(&self) -> &[u8] ⓘ
pub fn get_debug_loc_filename(&self) -> &[u8] ⓘ
pub fn get_debug_loc_line(&self) -> u32
pub fn get_debug_loc_column(&self) -> u32
pub fn is_null(&self) -> bool
pub fn get_alignment(&self) -> u32
pub fn set_alignment(&self, bytes: u32)
pub fn get_first_use(&self) -> Option<&Use>
pub fn get_operand(&self, index: u32) -> Option<&Value<any>>
pub fn get_operand_use(&self, index: u32) -> Option<&Use>
pub fn set_operand<O: TypeTag>(&self, index: u32, val: &Value<O>)
pub fn get_num_operands(&self) -> i32
pub fn to_any(&self) -> &Value<any>
pub fn get_kind(&self) -> LLVMValueKind
pub fn dump(&self)
Sourcepub fn print_to_string(&self) -> Message
pub fn print_to_string(&self) -> Message
Return a string representation of the value.
pub fn replace_all_uses_with(&self, new: &Self)where
T: InstanceTypeTag,
Sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Determine whether the specified value instance is constant.
pub fn is_a_metadata_node(&self) -> Option<&Value<metadata>>
pub fn is_a_value_as_metadata(&self) -> Option<&Value<metadata>>
pub fn is_a_metadata_string(&self) -> Option<&Value<metadata>>
pub fn is_a_argument(&self) -> Option<&Argument<T>>
pub fn is_a_basic_block(&self) -> Option<&Value<T>>
pub fn is_a_inline_asm(&self) -> Option<&Value<T>>
pub fn is_a_user(&self) -> Option<&Value<T>>
pub fn is_a_constant(&self) -> Option<&Constant<T>>
pub fn is_a_block_address(&self) -> Option<&Value<T>>
pub fn is_a_constant_aggregate_zero(&self) -> Option<&Value<T>>
pub fn is_a_constant_array(&self) -> Option<&Value<T>>
pub fn is_a_constant_data_sequential(&self) -> Option<&Value<T>>
pub fn is_a_constant_data_array(&self) -> Option<&Value<T>>
pub fn is_a_constant_data_vector(&self) -> Option<&Value<T>>
pub fn is_a_constant_expr(&self) -> Option<&Value<T>>
pub fn is_a_constant_fp(&self) -> Option<&Value<T>>
pub fn is_a_constant_int(&self) -> Option<&Value<T>>
pub fn is_a_constant_pointer_null(&self) -> Option<&Value<T>>
pub fn is_a_constant_struct(&self) -> Option<&Value<T>>
pub fn is_a_constant_token_none(&self) -> Option<&Value<T>>
pub fn is_a_constant_vector(&self) -> Option<&Value<T>>
pub fn is_a_global_value(&self) -> Option<&GlobalValue<any>>
pub fn is_a_global_alias(&self) -> Option<&GlobalAlias<any>>
pub fn is_a_global_i_func(&self) -> Option<&Value<T>>
pub fn is_a_global_object(&self) -> Option<&Value<T>>
pub fn is_a_function(&self) -> Option<&Function<T>>where
T: FunTypeTag,
pub fn is_a_global_variable(&self) -> Option<&Value<T>>
pub fn is_a_undef_value(&self) -> Option<&Value<T>>
pub fn is_a_poison_value(&self) -> Option<&Value<T>>
pub fn is_a_instruction(&self) -> Option<&Instruction<T>>
pub fn is_a_unary_operator(&self) -> Option<&Value<T>>
pub fn is_a_binary_operator(&self) -> Option<&Value<T>>
pub fn is_a_call_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_intrinsic_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_dbg_info_intrinsic(&self) -> Option<&Value<T>>
pub fn is_a_dbg_variable_intrinsic(&self) -> Option<&Value<T>>
pub fn is_a_dbg_declare_inst(&self) -> Option<&Value<T>>
pub fn is_a_dbg_label_inst(&self) -> Option<&Value<T>>
pub fn is_a_mem_intrinsic(&self) -> Option<&Value<T>>
pub fn is_a_mem_cpy_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_mem_move_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_mem_set_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_cmp_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_f_cmp_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_i_cmp_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_extract_element_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_get_element_ptr_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_insert_element_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_insert_value_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_landing_pad_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_phi_node(&self) -> Option<&Value<T>>
pub fn is_a_select_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_shuffle_vector_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_store_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_branch_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_indirect_br_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_invoke_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_return_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_switch_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_unreachable_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_resume_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_cleanup_return_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_catch_return_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_catch_switch_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_call_br_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_funclet_pad_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_catch_pad_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_cleanup_pad_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_unary_instruction(&self) -> Option<&Instruction<T>>
pub fn is_a_alloca_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_cast_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_addr_space_cast_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_bit_cast_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_fp_ext_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_fp_to_si_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_fp_to_ui_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_fp_trunc_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_int_to_ptr_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_ptr_to_int_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_s_ext_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_si_to_fp_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_trunc_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_ui_to_fp_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_z_ext_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_extract_value_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_load_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_va_arg_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_freeze_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_atomic_cmp_xchg_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_atomic_rmw_inst(&self) -> Option<&Instruction<T>>
pub fn is_a_fence_inst(&self) -> Option<&Instruction<T>>
pub fn get_num_indices(&self) -> u32
pub fn get_indices(&self) -> &[u32]
Trait Implementations§
Source§impl<T: TypeTag> Debug for GlobalValue<T>
impl<T: TypeTag> Debug for GlobalValue<T>
Source§impl<T: TypeTag> Deref for GlobalValue<T>
impl<T: TypeTag> Deref for GlobalValue<T>
Source§impl<T: TypeTag> Opaque for GlobalValue<T>
impl<T: TypeTag> Opaque for GlobalValue<T>
type Inner = LLVMValue
Source§unsafe fn try_from_raw<'a>(ptr: *mut Self::Inner) -> Option<&'a Self>
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
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>
unsafe fn from_ptr<'r>(ptr: *mut Self::Inner) -> Option<&'r Self>
Try to create ref from nullable raw pointer.
Source§unsafe fn cast_unchecked<T: Opaque<Inner = Self::Inner>>(&self) -> &T
unsafe fn cast_unchecked<T: Opaque<Inner = Self::Inner>>(&self) -> &T
Cast to target but don’t check cond.
fn cast<T: Opaque<Inner = Self::Inner>>(&self) -> &T
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more