aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_const.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-10-21 01:34:39 +0100
committergingerBill <bill@gingerbill.org>2021-10-21 01:34:39 +0100
commit48d277a3c4604481074df2914efbaba9e0dbed25 (patch)
tree6ff9cb7c65046197e043f8b83fdbd2c872dce170 /src/llvm_backend_const.cpp
parente0b9475378f4d69ebaf3e141ed941674b2c0d3f3 (diff)
Allow conversions between matrices of the same element count
Diffstat (limited to 'src/llvm_backend_const.cpp')
-rw-r--r--src/llvm_backend_const.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index 554255f47..b543089e5 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -524,7 +524,7 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
lbValue single_elem = lb_const_value(m, elem, value, allow_local);
single_elem.value = llvm_const_cast(single_elem.value, lb_type(m, elem));
- i64 total_elem_count = matrix_type_total_elems(type);
+ i64 total_elem_count = matrix_type_total_internal_elems(type);
LLVMValueRef *elems = gb_alloc_array(permanent_allocator(), LLVMValueRef, cast(isize)total_elem_count);
for (i64 i = 0; i < row; i++) {
elems[matrix_indices_to_offset(type, i, i)] = single_elem.value;
@@ -990,7 +990,7 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
}
i64 max_count = type->Matrix.row_count*type->Matrix.column_count;
- i64 total_count = matrix_type_total_elems(type);
+ i64 total_count = matrix_type_total_internal_elems(type);
LLVMValueRef *values = gb_alloc_array(temporary_allocator(), LLVMValueRef, cast(isize)total_count);
if (cl->elems[0]->kind == Ast_FieldValue) {