diff options
Diffstat (limited to 'src/codegen')
| -rw-r--r-- | src/codegen/llvm.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 65289b1a8c..c0c576cdf1 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -8030,7 +8030,8 @@ fn lowerFnRetTy(dg: *DeclGen, fn_info: Type.Payload.Function.Data) !*const llvm. } } if (classes[0] == .integer and classes[1] == .none) { - return llvm_types_buffer[0]; + const abi_size = fn_info.return_type.abiSize(target); + return dg.context.intType(@intCast(c_uint, abi_size * 8)); } return dg.context.structType(&llvm_types_buffer, llvm_types_index, .False); }, @@ -8124,7 +8125,8 @@ fn lowerFnParamTy(dg: *DeclGen, cc: std.builtin.CallingConvention, ty: Type) !*c } } if (classes[0] == .integer and classes[1] == .none) { - return llvm_types_buffer[0]; + const abi_size = ty.abiSize(target); + return dg.context.intType(@intCast(c_uint, abi_size * 8)); } return dg.context.structType(&llvm_types_buffer, llvm_types_index, .False); }, |
