fix bug in use of alignment in free for tag unions

This commit is contained in:
Folkert 2023-09-28 19:26:10 +02:00 committed by Brendan Hansknecht
parent c618cd5a4b
commit ec0eddb8b2
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
2 changed files with 3 additions and 2 deletions

View file

@ -3464,7 +3464,7 @@ pub(crate) fn build_exp_stmt<'a, 'ctx>(
Free(symbol) => {
// unconditionally deallocate the symbol
let (value, layout) = scope.load_symbol_and_layout(symbol);
let alignment = layout_interner.alignment_bytes(layout);
let alignment = layout_interner.allocation_alignment_bytes(layout);
debug_assert!(value.is_pointer_value());
let value = value.into_pointer_value();