forked from M-Labs/nac3
1
0
Fork 0

core: delete IrrtString

This commit is contained in:
lyken 2024-07-14 16:05:11 +08:00
parent e4998ccec8
commit 71e05c17b9
1 changed files with 0 additions and 27 deletions

View File

@ -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>>,