gingerBill 4 年之前
父節點
當前提交
f78b2a6090
共有 1 個文件被更改,包括 0 次插入7 次删除
  1. 0 7
      src/llvm_backend.cpp

+ 0 - 7
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;