Struct Context

Source
pub struct Context { /* private fields */ }

Implementations§

Source§

impl Context

Source

pub fn global_context() -> Context

Source

pub fn new() -> Context

Source

pub fn from_module(module: LLVMModuleRef) -> Context

Source

pub fn as_ref(&self) -> LLVMContextRef

Source

pub fn create_builder(&self) -> Builder

Source

pub fn create_module(&self, name: &str) -> Module

Source

pub fn StructTypeNamed(&self, name: &str) -> Struct

Source

pub fn StructType(&self, fields: &mut [LLVMTypeRef], packed: bool) -> Struct

Source

pub fn VoidType(&self) -> LLVMTypeRef

Source

pub fn IntType(&self, num_bits: c_uint) -> LLVMTypeRef

Source

pub fn Int1Type(&self) -> LLVMTypeRef

Source

pub fn Int8Type(&self) -> LLVMTypeRef

Source

pub fn Int16Type(&self) -> LLVMTypeRef

Source

pub fn Int32Type(&self) -> LLVMTypeRef

Source

pub fn Int64Type(&self) -> LLVMTypeRef

Source

pub fn Int128Type(&self) -> LLVMTypeRef

Source

pub fn HalfType(&self) -> LLVMTypeRef

Source

pub fn FloatType(&self) -> LLVMTypeRef

Source

pub fn DoubleType(&self) -> LLVMTypeRef

Source

pub fn FP128Type(&self) -> LLVMTypeRef

Source

pub fn X86FP80Type(&self) -> LLVMTypeRef

Source

pub fn PPCFP128Type(&self) -> LLVMTypeRef

Source

pub fn X86MMXType(&self) -> LLVMTypeRef

Source

pub fn LabelType(&self) -> LLVMTypeRef

Source

pub fn CharPointerType(&self) -> LLVMTypeRef

Source

pub fn Int8PointerType(&self) -> LLVMTypeRef

Source

pub fn PointerType(&self, typ: LLVMTypeRef) -> LLVMTypeRef

Source

pub fn Null(&self, typ: LLVMTypeRef) -> LLVMValueRef

Source

pub fn PointerNull(&self, typ: LLVMTypeRef) -> LLVMValueRef

Source

pub fn Bitcast( &self, constant: LLVMValueRef, to_type: LLVMTypeRef, ) -> LLVMValueRef

Source

pub fn SInt(&self, num_bits: c_uint, val: u64) -> LLVMValueRef

Source

pub fn UInt(&self, num_bits: c_uint, val: u64) -> LLVMValueRef

Source

pub fn SInt1(&self, val: u64) -> LLVMValueRef

Source

pub fn UInt1(&self, val: u64) -> LLVMValueRef

Source

pub fn SInt8(&self, val: u64) -> LLVMValueRef

Source

pub fn UInt8(&self, val: u64) -> LLVMValueRef

Source

pub fn SInt16(&self, val: u64) -> LLVMValueRef

Source

pub fn UInt16(&self, val: u64) -> LLVMValueRef

Source

pub fn SInt32(&self, val: u64) -> LLVMValueRef

Source

pub fn UInt32(&self, val: u64) -> LLVMValueRef

Source

pub fn SInt64(&self, val: u64) -> LLVMValueRef

Source

pub fn UInt64(&self, val: u64) -> LLVMValueRef

Source

pub fn SInt128(&self, val: u64) -> LLVMValueRef

Source

pub fn UInt128(&self, val: u64) -> LLVMValueRef

Source

pub fn Half(&self, val: f64) -> LLVMValueRef

Source

pub fn Float(&self, val: f64) -> LLVMValueRef

Source

pub fn Double(&self, val: f64) -> LLVMValueRef

Source

pub fn FP128(&self, val: f64) -> LLVMValueRef

Source

pub fn X86FP80(&self, val: f64) -> LLVMValueRef

Source

pub fn PPCFP128(&self, val: f64) -> LLVMValueRef

Trait Implementations§

Source§

impl Debug for Context

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.