core: delete IrrtString
This commit is contained in:
parent
e4998ccec8
commit
71e05c17b9
|
@ -75,33 +75,6 @@ impl<'ctx> Address<'ctx, NpArrayLens<'ctx>> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct IrrtStringFields<'ctx> {
|
|
||||||
pub buffer: GepGetter<AddressLens<IntLens<'ctx>>>,
|
|
||||||
pub capacity: GepGetter<IntLens<'ctx>>,
|
|
||||||
pub cursor: GepGetter<IntLens<'ctx>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
|
||||||
pub struct IrrtStringLens;
|
|
||||||
|
|
||||||
impl<'ctx> StructureOptic<'ctx> for IrrtStringLens {
|
|
||||||
type Fields = IrrtStringFields<'ctx>;
|
|
||||||
|
|
||||||
fn struct_name(&self) -> &'static str {
|
|
||||||
"String"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn build_fields(&self, builder: &mut FieldBuilder<'ctx>) -> Self::Fields {
|
|
||||||
let llvm_i8 = builder.ctx.i8_type();
|
|
||||||
let llvm_i32 = builder.ctx.i32_type();
|
|
||||||
IrrtStringFields {
|
|
||||||
buffer: builder.add_field("buffer", AddressLens(IntLens(llvm_i8))),
|
|
||||||
capacity: builder.add_field("capacity", IntLens(llvm_i32)),
|
|
||||||
cursor: builder.add_field("cursor", IntLens(llvm_i32)),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ErrorIdsFields<'ctx> {
|
pub struct ErrorIdsFields<'ctx> {
|
||||||
pub index_error: GepGetter<IntLens<'ctx>>,
|
pub index_error: GepGetter<IntLens<'ctx>>,
|
||||||
pub value_error: GepGetter<IntLens<'ctx>>,
|
pub value_error: GepGetter<IntLens<'ctx>>,
|
||||||
|
|
Loading…
Reference in New Issue