diff options
| author | gingerBill <bill@gingerbill.org> | 2019-03-15 15:41:06 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-03-15 15:41:06 +0000 |
| commit | 3d86fc2f2f4577c5eb708f7519d7f908a1d9d5bc (patch) | |
| tree | e739f850e57dcf93cc7a7a04457dff0d8a11b240 /src/ir.cpp | |
| parent | 712744ef367045f21c017137ad1856dca8814e7b (diff) | |
Minor adjustments
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 0d9a165cf..6d44282be 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -2975,12 +2975,12 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> args, Pro if (!are_types_identical(original_type, new_type)) { Type *arg_type = ir_type(args[i]); - if (is_type_pointer(new_type)) { + if (is_type_pointer(new_type) && !is_type_pointer(original_type)) { if (e->flags&EntityFlag_Value) { args[i] = ir_address_from_load_or_generate_local(p, args[i]); } else { if (is_type_pointer(arg_type)) { - args[i] = ir_copy_value_to_ptr(p, ir_emit_load(p, args[i]), original_type, 16); + // args[i] = ir_copy_value_to_ptr(p, ir_emit_load(p, args[i]), original_type, 16); } else { args[i] = ir_copy_value_to_ptr(p, args[i], original_type, 16); } |