aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_const.cpp
diff options
context:
space:
mode:
authorJesse Meyer <jesse.r.meyer@me.com>2026-02-03 20:52:52 -0500
committerGitHub <noreply@github.com>2026-02-03 20:52:52 -0500
commitb8276065f9296754d1e76e25d6661b7b5567e3e1 (patch)
tree7b8783d43193c16e4ef393a175fede50a8fe52dd /src/llvm_backend_const.cpp
parentbd6148dd6b77920cf64fea8804b205e8257e8a66 (diff)
parent270df36468df8f89e1ac944205272469142c7a65 (diff)
Merge branch 'master' into lto-support
Diffstat (limited to 'src/llvm_backend_const.cpp')
-rw-r--r--src/llvm_backend_const.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index 8ce2137ab..57c07f5c9 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -736,13 +736,14 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, lb
}
LLVMValueRef tag = LLVMConstInt(LLVMStructGetTypeAtIndex(llvm_type, 1), tag_value, false);
LLVMValueRef padding = nullptr;
- LLVMValueRef values[3] = {cv.value, tag, padding};
isize value_count = 2;
if (LLVMCountStructElementTypes(llvm_type) > 2) {
value_count = 3;
padding = LLVMConstNull(LLVMStructGetTypeAtIndex(llvm_type, 2));
}
+
+ LLVMValueRef values[3] = {cv.value, tag, padding};
res.value = llvm_const_named_struct_internal(m, llvm_type, values, value_count);
res.type = original_type;
return res;