use std::cell::RefCell;
use syntax::ast;
+// This depends on `Backend` and not `BackendTypes`, because consumers will probably want to use
+// `LayoutOf` or `HasTyCtxt`. This way, they don't have to add a constraint on it themselves.
pub trait BaseTypeMethods<'tcx>: Backend<'tcx> {
fn type_void(&self) -> Self::Type;
fn type_metadata(&self) -> Self::Type;
fn type_i64(&self) -> Self::Type;
fn type_i128(&self) -> Self::Type;
- // Creates an integer type with the given number of bits, e.g. i24
+ // Creates an integer type with the given number of bits, e.g., i24
fn type_ix(&self, num_bits: u64) -> Self::Type;
fn type_isize(&self) -> Self::Type;
fn type_func(&self, args: &[Self::Type], ret: Self::Type) -> Self::Type;
fn type_variadic_func(&self, args: &[Self::Type], ret: Self::Type) -> Self::Type;
fn type_struct(&self, els: &[Self::Type], packed: bool) -> Self::Type;
- fn type_named_struct(&self, name: &str) -> Self::Type;
fn type_array(&self, ty: Self::Type, len: u64) -> Self::Type;
fn type_vector(&self, ty: Self::Type, len: u64) -> Self::Type;
fn type_kind(&self, ty: Self::Type) -> TypeKind;
- fn set_struct_body(&self, ty: Self::Type, els: &[Self::Type], packed: bool);
fn type_ptr_to(&self, ty: Self::Type) -> Self::Type;
fn element_type(&self, ty: Self::Type) -> Self::Type;