mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-23 06:05:00 -07:00
Disable copy elision on assignments for the time being
This commit is contained in:
@@ -5056,12 +5056,12 @@ void lb_build_assignment(lbProcedure *p, Array<lbAddr> &lvals, Slice<Ast *> cons
|
||||
array_add(&inits, v);
|
||||
}
|
||||
} 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);
|
||||
if (p->copy_elision_hint.used) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user