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>
sourcepub unsafe fn new(value: LLVMValueRef) -> Self
pub unsafe fn new(value: LLVMValueRef) -> Self
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 unsafe fn get_incoming_unchecked(
self,
index: u32,
) -> (BasicValueEnum<'ctx>, BasicBlock<'ctx>)
pub unsafe fn get_incoming_unchecked( self, index: u32, ) -> (BasicValueEnum<'ctx>, BasicBlock<'ctx>)
§Safety
The index must be smaller PhiValue::count_incoming.
sourcepub fn get_incomings(self) -> IncomingIter<'ctx> ⓘ
pub fn get_incomings(self) -> IncomingIter<'ctx> ⓘ
Get an incoming edge iterator.
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
LLVMString
source§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§impl<'ctx> PartialEq<PhiValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<PhiValue<'ctx>> for AnyValueEnum<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for PhiValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for PhiValue<'ctx>
source§impl<'ctx> TryFrom<InstructionValue<'ctx>> for PhiValue<'ctx>
impl<'ctx> TryFrom<InstructionValue<'ctx>> for PhiValue<'ctx>
impl<'ctx> Copy for PhiValue<'ctx>
impl<'ctx> Eq for PhiValue<'ctx>
impl<'ctx> StructuralPartialEq for PhiValue<'ctx>
Auto Trait Implementations§
impl<'ctx> Freeze for PhiValue<'ctx>
impl<'ctx> RefUnwindSafe for PhiValue<'ctx>
impl<'ctx> !Send for PhiValue<'ctx>
impl<'ctx> !Sync for PhiValue<'ctx>
impl<'ctx> Unpin for PhiValue<'ctx>
impl<'ctx> UnwindSafe for PhiValue<'ctx>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more