aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_const.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2026-02-02 11:33:21 +0000
committerGitHub <noreply@github.com>2026-02-02 11:33:21 +0000
commitb9e4007cb190c1a5d96e7786e726dcbcac1d08c9 (patch)
tree37abe1e7e329c02fa541f5d0534a1ac1ea0713f6 /src/llvm_backend_const.cpp
parentc85af4a454dac14a8b557fa80fe68f5bf1905673 (diff)
parent63c4faca75635c0203ff576d7392fe7a0f9bca6c (diff)
Merge pull request #6216 from odin-lang/bill/debug-info-fixes
Debug Info Fixes
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;