Make sure that ZigTypeVector and ZigTypeArray have the same memory layout

Throughout the stage1 code it is assumed that these have the same layout,
but that was not the case. This caused an issue on 32-bit hardware.
This commit is contained in:
Timon Kruiper
2020-04-01 20:42:43 +02:00
parent ae6965a4e7
commit d33766e6c7
4 changed files with 10 additions and 3 deletions

View File

@@ -714,7 +714,7 @@ static LLVMValueRef get_arithmetic_overflow_fn(CodeGen *g, ZigType *operand_type
};
if (operand_type->id == ZigTypeIdVector) {
sprintf(fn_name, "llvm.%s.with.overflow.v%" PRIu32 "i%" PRIu32, signed_str,
sprintf(fn_name, "llvm.%s.with.overflow.v%" PRIu64 "i%" PRIu32, signed_str,
operand_type->data.vector.len, int_type->data.integral.bit_count);
LLVMTypeRef return_elem_types[] = {