Struct llvm_plugin_inkwell::values::StructValue
source · pub struct StructValue<'ctx> { /* private fields */ }Implementations§
source§impl<'ctx> StructValue<'ctx>
impl<'ctx> StructValue<'ctx>
sourcepub fn get_name(&self) -> &CStr
pub fn get_name(&self) -> &CStr
Gets the name of a StructValue. If the value is a constant, this will
return an empty string.
pub fn get_type(self) -> StructType<'ctx>
pub fn is_null(self) -> bool
pub fn is_undef(self) -> bool
pub fn print_to_stderr(self)
pub fn as_instruction(self) -> Option<InstructionValue<'ctx>>
pub fn get_num_operands(self) -> u32
pub fn set_operand<BV: BasicValue<'ctx>>(self, index: u32, val: BV) -> bool
pub fn get_operand(
self,
index: u32
) -> Option<Either<BasicValueEnum<'ctx>, BasicBlock<'ctx>>>
pub fn replace_all_uses_with(self, other: StructValue<'ctx>)
Trait Implementations§
source§impl<'ctx> AggregateValue<'ctx> for StructValue<'ctx>
impl<'ctx> AggregateValue<'ctx> for StructValue<'ctx>
source§fn as_aggregate_value_enum(&self) -> AggregateValueEnum<'ctx>
fn as_aggregate_value_enum(&self) -> AggregateValueEnum<'ctx>
Returns an enum containing a typed version of the
AggregateValue.source§impl<'ctx> AnyValue<'ctx> for StructValue<'ctx>
impl<'ctx> AnyValue<'ctx> for StructValue<'ctx>
source§fn as_any_value_enum(&self) -> AnyValueEnum<'ctx>
fn as_any_value_enum(&self) -> AnyValueEnum<'ctx>
Returns an enum containing a typed version of
AnyValue.source§fn print_to_string(&self) -> LLVMString
fn print_to_string(&self) -> LLVMString
Prints a value to a
LLVMStringsource§impl AsValueRef for StructValue<'_>
impl AsValueRef for StructValue<'_>
fn as_value_ref(&self) -> LLVMValueRef
source§impl<'ctx> BasicValue<'ctx> for StructValue<'ctx>
impl<'ctx> BasicValue<'ctx> for StructValue<'ctx>
source§fn as_basic_value_enum(&self) -> BasicValueEnum<'ctx>
fn as_basic_value_enum(&self) -> BasicValueEnum<'ctx>
Returns an enum containing a typed version of the
BasicValue.source§fn as_instruction_value(&self) -> Option<InstructionValue<'ctx>>
fn as_instruction_value(&self) -> Option<InstructionValue<'ctx>>
Most
BasicValues are the byproduct of an instruction
and so are convertable into an InstructionValuefn get_first_use(&self) -> Option<BasicValueUse<'_>>
source§impl<'ctx> Clone for StructValue<'ctx>
impl<'ctx> Clone for StructValue<'ctx>
source§fn clone(&self) -> StructValue<'ctx>
fn clone(&self) -> StructValue<'ctx>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'ctx> Debug for StructValue<'ctx>
impl<'ctx> Debug for StructValue<'ctx>
source§impl Display for StructValue<'_>
impl Display for StructValue<'_>
source§impl<'ctx> From<StructValue<'ctx>> for AggregateValueEnum<'ctx>
impl<'ctx> From<StructValue<'ctx>> for AggregateValueEnum<'ctx>
source§fn from(value: StructValue<'_>) -> AggregateValueEnum<'_>
fn from(value: StructValue<'_>) -> AggregateValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<StructValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<StructValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: StructValue<'_>) -> AnyValueEnum<'_>
fn from(value: StructValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<StructValue<'ctx>> for BasicMetadataValueEnum<'ctx>
impl<'ctx> From<StructValue<'ctx>> for BasicMetadataValueEnum<'ctx>
source§fn from(value: StructValue<'_>) -> BasicMetadataValueEnum<'_>
fn from(value: StructValue<'_>) -> BasicMetadataValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<StructValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> From<StructValue<'ctx>> for BasicValueEnum<'ctx>
source§fn from(value: StructValue<'_>) -> BasicValueEnum<'_>
fn from(value: StructValue<'_>) -> BasicValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> Hash for StructValue<'ctx>
impl<'ctx> Hash for StructValue<'ctx>
source§impl<'ctx> PartialEq<AggregateValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> PartialEq<AggregateValueEnum<'ctx>> for StructValue<'ctx>
source§fn eq(&self, other: &AggregateValueEnum<'ctx>) -> bool
fn eq(&self, other: &AggregateValueEnum<'ctx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for StructValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'ctx> PartialEq<BasicMetadataValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> PartialEq<BasicMetadataValueEnum<'ctx>> for StructValue<'ctx>
source§fn eq(&self, other: &BasicMetadataValueEnum<'ctx>) -> bool
fn eq(&self, other: &BasicMetadataValueEnum<'ctx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for StructValue<'ctx>
source§fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'ctx> PartialEq<StructValue<'ctx>> for AggregateValueEnum<'ctx>
impl<'ctx> PartialEq<StructValue<'ctx>> for AggregateValueEnum<'ctx>
source§fn eq(&self, other: &StructValue<'ctx>) -> bool
fn eq(&self, other: &StructValue<'ctx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'ctx> PartialEq<StructValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<StructValue<'ctx>> for AnyValueEnum<'ctx>
source§fn eq(&self, other: &StructValue<'ctx>) -> bool
fn eq(&self, other: &StructValue<'ctx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'ctx> PartialEq<StructValue<'ctx>> for BasicMetadataValueEnum<'ctx>
impl<'ctx> PartialEq<StructValue<'ctx>> for BasicMetadataValueEnum<'ctx>
source§fn eq(&self, other: &StructValue<'ctx>) -> bool
fn eq(&self, other: &StructValue<'ctx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'ctx> PartialEq<StructValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> PartialEq<StructValue<'ctx>> for BasicValueEnum<'ctx>
source§fn eq(&self, other: &StructValue<'ctx>) -> bool
fn eq(&self, other: &StructValue<'ctx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'ctx> PartialEq<StructValue<'ctx>> for StructValue<'ctx>
impl<'ctx> PartialEq<StructValue<'ctx>> for StructValue<'ctx>
source§fn eq(&self, other: &StructValue<'ctx>) -> bool
fn eq(&self, other: &StructValue<'ctx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.