aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-04-03 18:04:39 +0100
committergingerBill <bill@gingerbill.org>2021-04-03 18:04:39 +0100
commitf78b2a60906220c1b785d9eb40f58a6c5e6bd2f9 (patch)
treed59de36e68450add0a4c59cf9f494f131b9c1c89 /src/llvm_backend.cpp
parent46bf39cae10ce7f9de6dad413da1a1f95644e947 (diff)
Undo fix
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index bb59e2f47..3f439fd35 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -8261,13 +8261,6 @@ lbValue lb_emit_array_ep(lbProcedure *p, lbValue s, lbValue index) {
GB_ASSERT_MSG(is_type_array(st) || is_type_enumerated_array(st), "%s", type_to_string(st));
GB_ASSERT_MSG(is_type_integer(core_type(index.type)), "%s", type_to_string(index.type));
- if (st->kind == Type_EnumeratedArray &&
- is_type_enum(st->EnumeratedArray.index) &&
- are_types_identical(st->EnumeratedArray.index, index.type)) {
- lbValue min_value = lb_const_value(p->module, index.type, st->EnumeratedArray.min_value, false);
- index = lb_emit_arith(p, Token_Sub, index, min_value, index.type);
- }
-
LLVMValueRef indices[2] = {};
indices[0] = llvm_zero(p->module);
indices[1] = lb_emit_conv(p, index, t_int).value;