Simplify while_statement_to_firm() a bit, which can be done since new_immBlock()...
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 19 Jan 2011 14:53:32 +0000 (14:53 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 19 Jan 2011 14:53:32 +0000 (14:53 +0000)
[r28260]

ast2firm.c

index 394e168..1f9b467 100644 (file)
@@ -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);
        }