Skip to content

Commit

Permalink
refactor(arch/amd64): Type::Null is also ParamClass::Integer
Browse files Browse the repository at this point in the history
  • Loading branch information
MilkeeyCat committed Oct 7, 2024
1 parent db30bf1 commit 91e95da
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/archs/amd64/amd64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ enum ParamClass {
impl From<&Type> for ParamClass {
fn from(value: &Type) -> Self {
match value {
Type::Int(_) | Type::UInt(_) | Type::Bool | Type::Ptr(_) | Type::Array(_) => {
Self::Integer
}
Type::Int(_)
| Type::UInt(_)
| Type::Bool
| Type::Ptr(_)
| Type::Array(_)
| Type::Null => Self::Integer,
_ => unreachable!("Unsupported parameter type"),
}
}
Expand Down

0 comments on commit 91e95da

Please sign in to comment.