diff options
| author | Timon Kruiper <timonkruiper@gmail.com> | 2020-04-01 20:42:43 +0200 |
|---|---|---|
| committer | Timon Kruiper <timonkruiper@gmail.com> | 2020-04-01 20:50:13 +0200 |
| commit | d33766e6c7289b79256b2e50d0dc2344729ff710 (patch) | |
| tree | 24da3981755618f82cfec5da88ebe5df791a708b /src/codegen.cpp | |
| parent | ae6965a4e73cd5aad04e1c6831f48e7f0ecafc04 (diff) | |
| download | zig-d33766e6c7289b79256b2e50d0dc2344729ff710.tar.gz zig-d33766e6c7289b79256b2e50d0dc2344729ff710.zip | |
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.
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index d36e398bf7..088b3779a9 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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[] = { |
