static void do_while_statement_to_firm(do_while_statement_t *statement)
{
- ir_node *jmp = NULL;
- if (get_cur_block() != NULL) {
- jmp = new_Jmp();
- }
-
/* create the header block */
ir_node *header_block = new_immBlock();
/* the loop body */
ir_node *body_block = new_immBlock();
- if (jmp != NULL) {
- add_immBlock_pred(body_block, jmp);
+ if (get_cur_block() != NULL) {
+ add_immBlock_pred(body_block, new_Jmp());
}
ir_node *old_continue_label = continue_label;
set_Cond_default_proj(cond, default_proj_nr);
}
- if (statement->body != NULL) {
- statement_to_firm(statement->body);
- }
+ statement_to_firm(statement->body);
if (get_cur_block() != NULL) {
ir_node *jmp = new_Jmp();
dbg_info *dbgi = get_dbg_info(&statement->base.source_position);
- ir_node *const fallthrough = (get_cur_block() == NULL ? NULL : new_Jmp());
-
ir_node *proj;
ir_node *block = new_immBlock();
+ if (get_cur_block() != NULL) {
+ /* Fallthrough from previous case */
+ add_immBlock_pred(block, new_Jmp());
+ }
+
if (current_switch_cond != NULL) {
set_cur_block(get_nodes_block(current_switch_cond));
if (statement->expression != NULL) {
}
}
- if (fallthrough != NULL) {
- add_immBlock_pred(block, fallthrough);
- }
mature_immBlock(block);
set_cur_block(block);
- if (statement->statement != NULL) {
- statement_to_firm(statement->statement);
- }
+ statement_to_firm(statement->statement);
}
static void label_to_firm(const label_statement_t *statement)
keep_alive(block);
keep_all_memory(block);
- if (statement->statement != NULL) {
- statement_to_firm(statement->statement);
- }
+ statement_to_firm(statement->statement);
}
static void goto_to_firm(const goto_statement_t *statement)