Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
}
body.emit(assign(fallthru_var,
}
body.emit(assign(fallthru_var,
- body.constant(true),
- equal(label, deref_test_var)));
+ logic_or(fallthru_var, equal(label, deref_test_var))));
} else { /* default case */
if (state->switch_state.previous_default) {
YYLTYPE loc = this->get_location();
} else { /* default case */
if (state->switch_state.previous_default) {
YYLTYPE loc = this->get_location();
state->switch_state.previous_default = this;
/* Set fallthru condition on 'run_default' bool. */
state->switch_state.previous_default = this;
/* Set fallthru condition on 'run_default' bool. */
- body.emit(assign(fallthru_var, body.constant(true),
- state->switch_state.run_default));
+ body.emit(assign(fallthru_var,
+ logic_or(fallthru_var,
+ state->switch_state.run_default)));
}
/* Case statements do not have r-values. */
}
/* Case statements do not have r-values. */