[][src]Struct inkwell::values::VectorValue

pub struct VectorValue { /* fields omitted */ }

Methods

impl VectorValue[src]

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

Determines whether or not a VectorValue is a constant.

Example

use inkwell::context::Context;

let context = Context::create();
let i8_type = context.i8_type();
let i8_vec_type = i8_type.vec_type(3);
let i8_vec_zero = i8_vec_type.const_zero();

assert!(i8_vec_zero.is_const());

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

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

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

pub fn print_to_stderr(&self)[src]

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

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

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

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

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

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

pub fn const_extract_element(&self, index: IntValue) -> BasicValueEnum[src]

pub fn const_insert_element<BV: BasicValue>(
    &self,
    index: IntValue,
    value: BV
) -> BasicValueEnum
[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 replace_all_uses_with(&self, other: VectorValue)[src]

pub fn const_string(string: &str, null_terminated: bool) -> Self[src]

Creates a const string which may be null terminated.

Example

use inkwell::values::VectorValue;

let string = VectorValue::const_string("my_string", false);

assert_eq!(string.print_to_string().to_string(), "[9 x i8] c\"my_string\"");

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

Creates a const string which may be null terminated.

Example

use inkwell::values::VectorValue;

let string = VectorValue::const_string("my_string", false);

assert!(string.is_const_string());

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

pub fn get_element_as_constant(&self, index: u32) -> BasicValueEnum[src]

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

pub fn const_shuffle_vector(
    &self,
    right: VectorValue,
    mask: VectorValue
) -> VectorValue
[src]

Trait Implementations

impl BasicValue for VectorValue[src]

impl IntMathValue for VectorValue[src]

type BaseType = VectorType

impl FloatMathValue for VectorValue[src]

type BaseType = VectorType

impl PointerMathValue for VectorValue[src]

type BaseType = VectorType

impl AnyValue for VectorValue[src]

impl Eq for VectorValue[src]

impl Clone for VectorValue[src]

impl PartialEq<VectorValue> for AnyValueEnum[src]

impl PartialEq<AnyValueEnum> for VectorValue[src]

impl PartialEq<VectorValue> for BasicValueEnum[src]

impl PartialEq<BasicValueEnum> for VectorValue[src]

impl PartialEq<VectorValue> for BasicMetadataValueEnum[src]

impl PartialEq<BasicMetadataValueEnum> for VectorValue[src]

impl PartialEq<VectorValue> for VectorValue[src]

impl From<VectorValue> for AnyValueEnum[src]

impl From<VectorValue> for BasicValueEnum[src]

impl From<VectorValue> for BasicMetadataValueEnum[src]

impl Copy for VectorValue[src]

impl Hash for VectorValue[src]

impl Debug for VectorValue[src]

impl TryFrom<BasicValueEnum> for VectorValue[src]

type Error = &'static str

The type returned in the event of a conversion error.

Auto Trait Implementations

impl !Sync for VectorValue

impl !Send for VectorValue

impl Unpin for VectorValue

impl UnwindSafe for VectorValue

impl RefUnwindSafe for VectorValue

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]