diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-29 11:00:08 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-29 11:00:08 +0100 |
| commit | 89645921e2653b533131b9a292ffd3fb0195e8b5 (patch) | |
| tree | f62723c8f9e6fcc6cc6e8af03312c63429f5eec6 | |
| parent | e511f07d76d738533a6bc4dcf495dca15afc8b13 (diff) | |
Only add packing if the padding is non-zero for a #raw_union constant
| -rw-r--r-- | src/llvm_backend_const.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp index 87e7962d4..193bffe08 100644 --- a/src/llvm_backend_const.cpp +++ b/src/llvm_backend_const.cpp @@ -1513,7 +1513,7 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, lb 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}; } |