[][src]Struct inkwell::values::IntValue

pub struct IntValue { /* fields omitted */ }

Methods

impl IntValue[src]

pub fn get_name(&self) -> &CStr[src]

pub fn set_name(&self, name: &str)[src]

pub fn get_type(&self) -> IntType[src]

pub fn is_null(&self) -> bool[src]

pub fn is_undef(&self) -> bool[src]

pub fn print_to_string(&self) -> LLVMString[src]

pub fn print_to_stderr(&self)[src]

pub fn as_instruction(&self) -> Option<InstructionValue>[src]

pub fn const_not(&self) -> Self[src]

pub fn const_neg(&self) -> Self[src]

pub fn const_nsw_neg(&self) -> Self[src]

pub fn const_nuw_neg(&self) -> Self[src]

pub fn const_add(&self, rhs: IntValue) -> Self[src]

pub fn const_nsw_add(&self, rhs: IntValue) -> Self[src]

pub fn const_nuw_add(&self, rhs: IntValue) -> Self[src]

pub fn const_sub(&self, rhs: IntValue) -> Self[src]

pub fn const_nsw_sub(&self, rhs: IntValue) -> Self[src]

pub fn const_nuw_sub(&self, rhs: IntValue) -> Self[src]

pub fn const_mul(&self, rhs: IntValue) -> Self[src]

pub fn const_nsw_mul(&self, rhs: IntValue) -> Self[src]

pub fn const_nuw_mul(&self, rhs: IntValue) -> Self[src]

pub fn const_unsigned_div(&self, rhs: IntValue) -> Self[src]

pub fn const_signed_div(&self, rhs: IntValue) -> Self[src]

pub fn const_exact_signed_div(&self, rhs: IntValue) -> Self[src]

pub fn const_exact_unsigned_div(&self, rhs: IntValue) -> Self[src]

pub fn const_unsigned_remainder(&self, rhs: IntValue) -> Self[src]

pub fn const_signed_remainder(&self, rhs: IntValue) -> Self[src]

pub fn const_and(&self, rhs: IntValue) -> Self[src]

pub fn const_or(&self, rhs: IntValue) -> Self[src]

pub fn const_xor(&self, rhs: IntValue) -> Self[src]

pub fn const_cast(&self, int_type: IntType, is_signed: bool) -> Self[src]

pub fn const_shl(&self, rhs: IntValue) -> Self[src]

pub fn const_rshr(&self, rhs: IntValue) -> Self[src]

pub fn const_ashr(&self, rhs: IntValue) -> Self[src]

pub fn const_unsigned_to_float(&self, float_type: FloatType) -> FloatValue[src]

pub fn const_signed_to_float(&self, float_type: FloatType) -> FloatValue[src]

pub fn const_to_pointer(&self, ptr_type: PointerType) -> PointerValue[src]

pub fn const_truncate(&self, int_type: IntType) -> IntValue[src]

pub fn const_s_extend(&self, int_type: IntType) -> IntValue[src]

pub fn const_z_ext(&self, int_type: IntType) -> IntValue[src]

pub fn const_truncate_or_bit_cast(&self, int_type: IntType) -> IntValue[src]

pub fn const_s_extend_or_bit_cast(&self, int_type: IntType) -> IntValue[src]

pub fn const_z_ext_or_bit_cast(&self, int_type: IntType) -> IntValue[src]

pub fn const_bit_cast(&self, int_type: IntType) -> IntValue[src]

pub fn has_metadata(&self) -> bool[src]

pub fn get_metadata(&self, kind_id: u32) -> Option<MetadataValue>[src]

pub fn set_metadata(&self, metadata: MetadataValue, kind_id: u32)[src]

pub fn const_int_compare(&self, op: IntPredicate, rhs: IntValue) -> IntValue[src]

pub fn const_select<BV: BasicValue>(
    &self,
    then: BV,
    else_: BV
) -> BasicValueEnum
[src]

pub fn is_const(&self) -> bool[src]

Determines whether or not an IntValue is a constant.

Example

use inkwell::context::Context;

let context = Context::create();
let i64_type = context.i64_type();
let i64_val = i64_type.const_int(12, false);

assert!(i64_val.is_const());

pub fn get_zero_extended_constant(&self) -> Option<u64>[src]

Obtains a constant IntValue's zero extended value.

Example

use inkwell::context::Context;

let context = Context::create();
let i8_type = context.i8_type();
let i8_all_ones = i8_type.const_all_ones();

assert_eq!(i8_all_ones.get_zero_extended_constant(), Some(255));

pub fn get_sign_extended_constant(&self) -> Option<i64>[src]

Obtains a constant IntValue's sign extended value.

Example

use inkwell::context::Context;

let context = Context::create();
let i8_type = context.i8_type();
let i8_all_ones = i8_type.const_all_ones();

assert_eq!(i8_all_ones.get_sign_extended_constant(), Some(-1));

pub fn replace_all_uses_with(&self, other: IntValue)[src]

Trait Implementations

impl BasicValue for IntValue[src]

impl IntMathValue for IntValue[src]

type BaseType = IntType

impl AnyValue for IntValue[src]

impl Eq for IntValue[src]

impl Clone for IntValue[src]

impl PartialEq<IntValue> for AnyValueEnum[src]

impl PartialEq<AnyValueEnum> for IntValue[src]

impl PartialEq<IntValue> for BasicValueEnum[src]

impl PartialEq<BasicValueEnum> for IntValue[src]

impl PartialEq<IntValue> for BasicMetadataValueEnum[src]

impl PartialEq<BasicMetadataValueEnum> for IntValue[src]

impl PartialEq<IntValue> for IntValue[src]

impl From<IntValue> for AnyValueEnum[src]

impl From<IntValue> for BasicValueEnum[src]

impl From<IntValue> for BasicMetadataValueEnum[src]

impl Copy for IntValue[src]

impl Hash for IntValue[src]

impl Debug for IntValue[src]

impl TryFrom<BasicValueEnum> for IntValue[src]

type Error = &'static str

The type returned in the event of a conversion error.

Auto Trait Implementations

impl !Sync for IntValue

impl !Send for IntValue

impl Unpin for IntValue

impl UnwindSafe for IntValue

impl RefUnwindSafe for IntValue

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]