Struct Value

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

Implementations§

Source§

impl<T: TypeTag> Value<T>

Source

pub fn get_comdat(&self) -> &Comdat

Source

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

Source§

impl<T: TypeTag> Value<T>

Source

pub fn is_basic_block(&self) -> bool

Source§

impl Value<label>

Source§

impl<T: TypeTag> Value<T>

Source

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

Source

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

Source§

impl<T: TypeTag> Value<T>

Source§

impl Value<metadata>

Source

pub fn as_metadata(&self) -> &Metadata

Source§

impl Value<metadata>

Source

pub fn get_md_string(&self) -> Option<&[u8]>

Source

pub fn get_md_node_num_operands(&self) -> u32

Source

pub fn get_md_node_operands<'s, 'c>( &self, dest: &'s mut [Option<&'c Value<metadata>>], ) -> &'s mut [&'c Value<metadata>]

Source

pub fn replace_md_node_operand_with(&self, index: u32, replacement: &Metadata)

Source§

impl<T: TypeTag> Value<T>

Source§

impl<T: TypeTag> Value<T>

Source§

impl<T: TypeTag> Value<T>

Source

pub fn is_null(&self) -> bool

Source§

impl<T: TypeTag> Value<T>

Source

pub fn get_alignment(&self) -> u32

Source

pub fn set_alignment(&self, bytes: u32)

Source§

impl<T: TypeTag> Value<T>

Source

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

Source§

impl<T: TypeTag> Value<T>

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§

impl<T: TypeTag> Value<T>

Source

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

Source§

impl<T: TypeTag> Value<T>

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§

impl<T: TypeTag> Value<T>

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§

impl<T: TypeTag> Value<T>

Source

pub fn get_num_indices(&self) -> u32

Source

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

Trait Implementations§

Source§

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

Source§

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

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

impl<T: TypeTag> Opaque for Value<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 Value<T>

§

impl<T> !RefUnwindSafe for Value<T>

§

impl<T> Send for Value<T>

§

impl<T> !Sync for Value<T>

§

impl<T> !Unpin for Value<T>

§

impl<T> UnwindSafe for Value<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<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.