Struct llvm_plugin_inkwell::values::PhiValue
source · pub struct PhiValue<'ctx> { /* private fields */ }Expand description
A Phi Instruction returns a value based on which basic block branched into the Phi’s containing basic block.
Implementations§
source§impl<'ctx> PhiValue<'ctx>
impl<'ctx> PhiValue<'ctx>
pub fn add_incoming(self, incoming: &[(&dyn BasicValue<'ctx>, BasicBlock<'ctx>)])
pub fn count_incoming(self) -> u32
pub fn get_incoming(
self,
index: u32
) -> Option<(BasicValueEnum<'ctx>, BasicBlock<'ctx>)>
sourcepub fn get_name(&self) -> &CStr
pub fn get_name(&self) -> &CStr
Gets the name of a ArrayValue. If the value is a constant, this will
return an empty string.
pub fn set_name(self, name: &str)
pub fn is_null(self) -> bool
pub fn is_undef(self) -> bool
pub fn as_instruction(self) -> InstructionValue<'ctx>
pub fn replace_all_uses_with(self, other: &PhiValue<'ctx>)
pub fn as_basic_value(self) -> BasicValueEnum<'ctx>
Trait Implementations§
source§impl<'ctx> AnyValue<'ctx> for PhiValue<'ctx>
impl<'ctx> AnyValue<'ctx> for PhiValue<'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 PhiValue<'_>
impl AsValueRef for PhiValue<'_>
fn as_value_ref(&self) -> LLVMValueRef
source§impl<'ctx> From<PhiValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<PhiValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: PhiValue<'_>) -> AnyValueEnum<'_>
fn from(value: PhiValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for PhiValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for PhiValue<'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 ==.