diff options
| author | gingerBill <bill@gingerbill.org> | 2019-10-10 20:52:07 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-10-10 20:52:07 +0100 |
| commit | abfa8945661f24006e4f8506c1ec2861569228ec (patch) | |
| tree | 3012c0c67b514f0b8b4eb34aa9fbb76feaf92e60 /src/ir.cpp | |
| parent | 5b52fed268b3544bea562f4263d447b96ebacd3a (diff) | |
Fix general IR parameter case
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 16a017407..017a12025 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -3061,8 +3061,8 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> const &ar Type *new_type = pt->Proc.abi_compat_params[i]; Type *arg_type = ir_type(args[i]); if (are_types_identical(arg_type, new_type)) { - array_add(&processed_args, args[i]); // NOTE(bill): Done + array_add(&processed_args, args[i]); } else if (!are_types_identical(original_type, new_type)) { if (is_type_pointer(new_type) && !is_type_pointer(original_type)) { if (e->flags&EntityFlag_ImplicitReference) { @@ -3085,6 +3085,9 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> const &ar array_add(&processed_args, xx); } } + } else { + irValue *x = ir_emit_conv(p, args[i], new_type); + array_add(&processed_args, x); } } |