mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Merge remote-tracking branch 'remote/main' into upgrade-llvm-zig
This commit is contained in:
commit
99e2bc2038
253 changed files with 7403 additions and 4217 deletions
|
@ -244,7 +244,7 @@ fn alignment_type(context: &Context, alignment: u32) -> BasicTypeEnum {
|
|||
2 => context.i16_type().into(),
|
||||
4 => context.i32_type().into(),
|
||||
8 => context.i64_type().into(),
|
||||
16 => context.i128_type().into(),
|
||||
16 => context.f128_type().into(),
|
||||
_ => unimplemented!("weird alignment: {alignment}"),
|
||||
}
|
||||
}
|
||||
|
@ -385,7 +385,8 @@ impl<'ctx> RocUnion<'ctx> {
|
|||
let mut width = self.data_width;
|
||||
|
||||
// add padding between data and the tag id
|
||||
width = round_up_to_alignment(width, tag_id_width);
|
||||
let tag_id_alignment = tag_id_width.max(1);
|
||||
width = round_up_to_alignment(width, tag_id_alignment);
|
||||
|
||||
// add tag id
|
||||
width += tag_id_width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue