mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Only add packing if the padding is non-zero for a #raw_union constant
This commit is contained in:
@@ -1513,7 +1513,7 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, lb
|
|||||||
values[value_count++] = LLVMConstNull(padding_type);
|
values[value_count++] = LLVMConstNull(padding_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMValueRef res = LLVMConstStructInContext(m->ctx, values, value_count, true);
|
LLVMValueRef res = LLVMConstStructInContext(m->ctx, values, value_count, /*packed*/padding > 0);
|
||||||
|
|
||||||
return {res, original_type};
|
return {res, original_type};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user