diff options
| author | gingerBill <bill@gingerbill.org> | 2021-10-20 17:00:14 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-10-20 17:00:14 +0100 |
| commit | e6f725dc2c71d960defda3aa549b47e0cd043c70 (patch) | |
| tree | 545853b0671c389766fae2209d9696912d0d4307 | |
| parent | 3e4c2e49320b6ddd905b38fc884ec47aa8da7748 (diff) | |
Minor fix for parapoly matrix types
| -rw-r--r-- | src/check_builtin.cpp | 1 | ||||
| -rw-r--r-- | src/llvm_backend_proc.cpp | 3 | ||||
| -rw-r--r-- | src/types.cpp | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index 7dc4784f8..1535dc2a2 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -2168,7 +2168,6 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32 break; } - case BuiltinProc_simd_vector: { Operand x = {}; Operand y = {}; diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp index 72ba3982c..5623f75ec 100644 --- a/src/llvm_backend_proc.cpp +++ b/src/llvm_backend_proc.cpp @@ -1313,8 +1313,7 @@ lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValue const &tv, lbValue m = lb_build_expr(p, ce->args[0]); return lb_emit_matrix_flatten(p, m, tv.type); } - - + // "Intrinsics" case BuiltinProc_alloca: diff --git a/src/types.cpp b/src/types.cpp index 32e26bcc6..716ebe31f 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -1334,12 +1334,16 @@ i64 matrix_indices_to_offset(Type *t, i64 row_index, i64 column_index) { } bool is_type_valid_for_matrix_elems(Type *t) { + t = base_type(t); if (is_type_integer(t)) { return true; } else if (is_type_float(t)) { return true; } else if (is_type_complex(t)) { return true; + } + if (t->kind == Type_Generic) { + return true; } return false; } |