Implement missing ABI structures in StableMIR

This commit is contained in:
Celina G. Val
2024-02-29 15:23:44 -08:00
parent 6db96de66c
commit e3ac2c68b8
6 changed files with 274 additions and 26 deletions

View File

@@ -324,7 +324,9 @@ impl TyKind {
#[inline]
pub fn is_cstr(&self) -> bool {
let TyKind::RigidTy(RigidTy::Adt(def, _)) = self else { return false };
let TyKind::RigidTy(RigidTy::Adt(def, _)) = self else {
return false;
};
with(|cx| cx.adt_is_cstr(*def))
}
@@ -1032,10 +1034,13 @@ pub struct BoundTy {
}
pub type Bytes = Vec<Option<u8>>;
/// Size in bytes.
pub type Size = usize;
#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
pub struct Prov(pub AllocId);
pub type Align = u64;
pub type Promoted = u32;
pub type InitMaskMaterialized = Vec<u64>;