From: Christoph Mallon Date: Wed, 19 Jan 2011 14:53:32 +0000 (+0000) Subject: Simplify while_statement_to_firm() a bit, which can be done since new_immBlock()... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=44b30d66b1236f3eaad9170abc1967527d264fe0;p=cparser Simplify while_statement_to_firm() a bit, which can be done since new_immBlock() does not set current_block anymore. [r28260] --- diff --git a/ast2firm.c b/ast2firm.c index 394e168..1f9b467 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -4923,14 +4923,10 @@ static void if_statement_to_firm(if_statement_t *statement) static void while_statement_to_firm(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(); - if (jmp != NULL) { + if (get_cur_block() != NULL) { + ir_node *const jmp = new_Jmp(); add_immBlock_pred(header_block, jmp); } @@ -4950,7 +4946,7 @@ static void while_statement_to_firm(while_statement_t *statement) break_label = old_break_label; if (get_cur_block() != NULL) { - jmp = new_Jmp(); + ir_node *const jmp = new_Jmp(); add_immBlock_pred(header_block, jmp); }