diff options
| author | gingerBill <bill@gingerbill.org> | 2020-05-12 14:57:37 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-05-12 14:57:37 +0100 |
| commit | 0ba3b5c0bd5c0c32b92f86683098a929fc143962 (patch) | |
| tree | 148801b2271e85b373679fc13b579714bbdbbecd /src/llvm_backend.cpp | |
| parent | fcdfcfce19bff98a3dbfa4b8f960d7bcd64679aa (diff) | |
Fix bug for array-like compounds for LLVM-API
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 615e01c15..ead835531 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -4495,7 +4495,7 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value) { res.value = LLVMConstArray(lb_type(m, elem), elems, cast(unsigned)count); return res; - } + } switch (value.kind) { case ExactValue_Invalid: @@ -4631,9 +4631,6 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value) { } if (lo == i) { TypeAndValue tav = fv->value->tav; - if (tav.mode != Addressing_Constant) { - break; - } LLVMValueRef val = lb_const_value(m, elem_type, tav.value).value; for (i64 k = lo; k < hi; k++) { values[value_index++] = val; @@ -4649,9 +4646,6 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value) { i64 index = exact_value_to_i64(index_tav.value); if (index == i) { TypeAndValue tav = fv->value->tav; - if (tav.mode != Addressing_Constant) { - break; - } LLVMValueRef val = lb_const_value(m, elem_type, tav.value).value; values[value_index++] = val; found = true; @@ -4724,9 +4718,6 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value) { } if (lo == i) { TypeAndValue tav = fv->value->tav; - if (tav.mode != Addressing_Constant) { - break; - } LLVMValueRef val = lb_const_value(m, elem_type, tav.value).value; for (i64 k = lo; k < hi; k++) { values[value_index++] = val; @@ -4742,9 +4733,6 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value) { i64 index = exact_value_to_i64(index_tav.value); if (index == i) { TypeAndValue tav = fv->value->tav; - if (tav.mode != Addressing_Constant) { - break; - } LLVMValueRef val = lb_const_value(m, elem_type, tav.value).value; values[value_index++] = val; found = true; |