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