Struct Global

Source
pub struct Global;

Implementations§

Source§

impl Global

Source

pub fn const_array(ctx: &Context, array: &[LLVMValue]) -> LLVMValue

Source

pub fn const_unit() -> LLVMValue

Source

pub fn const_double(value: f64) -> DoubleValue

Source

pub fn const_float(value: f32) -> FloatValue

Source

pub fn const_i8(value: i8) -> Int8Value

Source

pub fn const_bool(value: bool) -> BoolValue

Source

pub fn sizeof(ty: LLVMType) -> LLVMValue

Source

pub fn const_i16(value: i16) -> Int16Value

Source

pub fn const_i32(value: i32) -> Int32Value

Source

pub fn const_i64(value: i64) -> Int64Value

Source

pub fn i8_type() -> LLVMType

Source

pub fn i1_type() -> LLVMType

Source

pub fn i16_type() -> LLVMType

Source

pub fn i32_type() -> LLVMType

Source

pub fn i64_type() -> LLVMType

Source

pub fn struct_type( name: String, element_type: Vec<(String, LLVMType)>, ) -> LLVMType

Source

pub fn array_type(element_type: LLVMType) -> LLVMType

Source

pub fn unit_type() -> LLVMType

Source

pub fn float_type() -> LLVMType

Source

pub fn double_type() -> LLVMType

Source

pub fn function_type( return_type: LLVMType, param_types: Vec<(String, LLVMType)>, ) -> LLVMType

Source

pub fn function_type_with_var_arg( return_type: LLVMType, param_types: Vec<(String, LLVMType)>, ) -> LLVMType

Source

pub fn pointer_type(element_type: LLVMType) -> LLVMType

Source

pub fn ref_type(element_type: LLVMType) -> LLVMType

Source

pub fn string_type() -> LLVMType

Source

pub fn const_string(str: impl AsRef<str>) -> LLVMValue

Source

pub fn create_builder() -> IRBuilder

Source

pub fn type_of_string(s: &str) -> LLVMType

Auto Trait Implementations§

§

impl Freeze for Global

§

impl RefUnwindSafe for Global

§

impl Send for Global

§

impl Sync for Global

§

impl Unpin for Global

§

impl UnwindSafe for Global

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.