pub struct Value(_);Expand description
A typed value that can be used as an operand in instructions.
Implementations§
source§impl Value
impl Value
sourcepub fn new_struct<'a>(
context: &'a Context,
vals: &[&'a Value],
packed: bool
) -> &'a Value
pub fn new_struct<'a>(
context: &'a Context,
vals: &[&'a Value],
packed: bool
) -> &'a Value
Create a new constant struct from the values given.
sourcepub fn new_vector<'a>(vals: &[&'a Value]) -> &'a Value
pub fn new_vector<'a>(vals: &[&'a Value]) -> &'a Value
Create a new constant vector from the values given.
sourcepub fn new_string<'a>(
context: &'a Context,
text: &str,
rust_style: bool
) -> &'a Value
pub fn new_string<'a>(
context: &'a Context,
text: &str,
rust_style: bool
) -> &'a Value
Create a new constant C string from the text given.
sourcepub fn new_undef<'a>(ty: &'a Type) -> &'a Value
pub fn new_undef<'a>(ty: &'a Type) -> &'a Value
Create a new constant undefined value of the given type.
Trait Implementations§
source§impl<'a> From<&'a Value> for LLVMValueRef
impl<'a> From<&'a Value> for LLVMValueRef
source§fn from(ty: &'a Value) -> LLVMValueRef
fn from(ty: &'a Value) -> LLVMValueRef
Converts to this type from the input type.
source§impl<'a> From<&'a mut Value> for LLVMValueRef
impl<'a> From<&'a mut Value> for LLVMValueRef
source§fn from(ty: &'a mut Value) -> LLVMValueRef
fn from(ty: &'a mut Value) -> LLVMValueRef
Converts to this type from the input type.
source§impl<'a> From<*mut LLVMValue> for &'a Value
impl<'a> From<*mut LLVMValue> for &'a Value
source§fn from(ty: LLVMValueRef) -> &'a Value
fn from(ty: LLVMValueRef) -> &'a Value
Converts to this type from the input type.
source§impl<'a> From<*mut LLVMValue> for &'a mut Value
impl<'a> From<*mut LLVMValue> for &'a mut Value
source§fn from(ty: LLVMValueRef) -> &'a mut Value
fn from(ty: LLVMValueRef) -> &'a mut Value
Converts to this type from the input type.
source§impl GetContext for Value
impl GetContext for Value
source§fn get_context(&self) -> &Context
fn get_context(&self) -> &Context
Returns a reference to the context that owns this value. Read more