pub(crate) type SimpleCx<'ll> = GenericCx<'ll, SCx<'ll>>;
Aliased Type§
struct SimpleCx<'ll>(SCx<'ll>, PhantomData<SCx<'ll>>);
Fields§
§0: SCx<'ll>
§1: PhantomData<SCx<'ll>>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Implementations
Source§impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
Sourcepub(crate) fn set_metadata<'a>(
&self,
val: &'a Value,
kind_id: impl Into<MetadataKindId>,
md: &'ll Metadata,
)
pub(crate) fn set_metadata<'a>( &self, val: &'a Value, kind_id: impl Into<MetadataKindId>, md: &'ll Metadata, )
A wrapper for llvm::LLVMSetMetadata
, but it takes Metadata
as a parameter instead of Value
.
Source§impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
pub(crate) fn get_metadata_value(&self, metadata: &'ll Metadata) -> &'ll Value
pub(crate) fn get_const_i64(&self, n: u64) -> &'ll Value
pub(crate) fn get_function(&self, name: &str) -> Option<&'ll Value>
pub(crate) fn get_md_kind_id(&self, name: &str) -> MetadataKindId
pub(crate) fn create_metadata(&self, name: String) -> Option<&'ll Metadata>
Source§impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
Sourcepub(crate) fn declare_global(&self, name: &str, ty: &'ll Type) -> &'ll Value
pub(crate) fn declare_global(&self, name: &str, ty: &'ll Type) -> &'ll Value
Declare a global value.
If there’s a value with the same name already declared, the function will return its Value instead.
Source§impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
pub(crate) fn llcx(&self) -> &'ll Context
pub(crate) fn isize_ty(&self) -> &'ll Type
pub(crate) fn type_variadic_func( &self, args: &[&'ll Type], ret: &'ll Type, ) -> &'ll Type
pub(crate) fn type_i1(&self) -> &'ll Type
pub(crate) fn type_struct(&self, els: &[&'ll Type], packed: bool) -> &'ll Type
Source§impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX>
pub(crate) fn type_named_struct(&self, name: &str) -> &'ll Type
pub(crate) fn set_struct_body( &self, ty: &'ll Type, els: &[&'ll Type], packed: bool, )
pub(crate) fn type_void(&self) -> &'ll Type
pub(crate) fn type_token(&self) -> &'ll Type
pub(crate) fn type_metadata(&self) -> &'ll Type
Sourcepub(crate) fn type_ix(&self, num_bits: u64) -> &'ll Type
pub(crate) fn type_ix(&self, num_bits: u64) -> &'ll Type
x Creates an integer type with the given number of bits, e.g., i24
pub(crate) fn type_vector(&self, ty: &'ll Type, len: u64) -> &'ll Type
pub(crate) fn func_params_types(&self, ty: &'ll Type) -> Vec<&'ll Type>
Trait Implementations
Source§impl<'ll, CX: Borrow<SCx<'ll>>> BackendTypes for GenericCx<'ll, CX>
impl<'ll, CX: Borrow<SCx<'ll>>> BackendTypes for GenericCx<'ll, CX>
type Value = &'ll Value
type Metadata = &'ll Metadata
type Function = &'ll Value
type BasicBlock = &'ll BasicBlock
type Type = &'ll Type
type Funclet = Funclet<'ll>
type DIScope = &'ll Metadata
type DILocation = &'ll Metadata
type DIVariable = &'ll Metadata
Source§impl<'ll, CX: Borrow<SCx<'ll>>> BaseTypeCodegenMethods for GenericCx<'ll, CX>
impl<'ll, CX: Borrow<SCx<'ll>>> BaseTypeCodegenMethods for GenericCx<'ll, CX>
fn type_i8(&self) -> &'ll Type
fn type_i16(&self) -> &'ll Type
fn type_i32(&self) -> &'ll Type
fn type_i64(&self) -> &'ll Type
fn type_i128(&self) -> &'ll Type
fn type_isize(&self) -> &'ll Type
fn type_f16(&self) -> &'ll Type
fn type_f32(&self) -> &'ll Type
fn type_f64(&self) -> &'ll Type
fn type_f128(&self) -> &'ll Type
fn type_func(&self, args: &[&'ll Type], ret: &'ll Type) -> &'ll Type
fn type_kind(&self, ty: &'ll Type) -> TypeKind
fn type_ptr(&self) -> &'ll Type
fn type_ptr_ext(&self, address_space: AddressSpace) -> &'ll Type
fn element_type(&self, ty: &'ll Type) -> &'ll Type
Source§fn vector_length(&self, ty: &'ll Type) -> usize
fn vector_length(&self, ty: &'ll Type) -> usize
Returns the number of elements in
self
if it is an LLVM vector type.