Disable copy elision on assignments for the time being

This commit is contained in:
gingerBill
2021-05-25 15:43:34 +01:00
parent c21c754b6f
commit 4a886a1bc5
+2 -2
View File
@@ -5056,12 +5056,12 @@ void lb_build_assignment(lbProcedure *p, Array<lbAddr> &lvals, Slice<Ast *> cons
array_add(&inits, v); array_add(&inits, v);
} }
} else { } else {
auto prev_hint = lb_set_copy_elision_hint(p, lvals[inits.count], rhs); // auto prev_hint = lb_set_copy_elision_hint(p, lvals[inits.count], rhs);
lbValue init = lb_build_expr(p, rhs); lbValue init = lb_build_expr(p, rhs);
if (p->copy_elision_hint.used) { if (p->copy_elision_hint.used) {
lvals[inits.count] = {}; // zero lval lvals[inits.count] = {}; // zero lval
} }
lb_reset_copy_elision_hint(p, prev_hint); // lb_reset_copy_elision_hint(p, prev_hint);
array_add(&inits, init); array_add(&inits, init);
} }
} }