Reduce variable scope.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 25 Apr 2012 12:34:32 +0000 (14:34 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 26 Apr 2012 07:57:54 +0000 (09:57 +0200)
ast2firm.c

index 4b7bbde..f4ced40 100644 (file)
@@ -4276,7 +4276,6 @@ static void create_variable_initializer(entity_t *entity)
        type_qualifiers_t  tq   = get_type_qualifier(type, true);
 
        if (initializer->kind == INITIALIZER_VALUE) {
-               dbg_info     *const dbgi      = get_dbg_info(&entity->base.source_position);
                expression_t *      value     = initializer->value.value;
                type_t       *const init_type = skip_typeref(value->base.type);
 
@@ -4291,9 +4290,9 @@ static void create_variable_initializer(entity_t *entity)
                        goto have_initializer;
                }
 
-               ir_node *node = expression_to_firm(value);
-
-               ir_mode *mode      = get_ir_mode_storage(init_type);
+               ir_node  *      node = expression_to_firm(value);
+               dbg_info *const dbgi = get_dbg_info(&entity->base.source_position);
+               ir_mode  *const mode = get_ir_mode_storage(init_type);
                node = create_conv(dbgi, node, mode);
                node = do_strict_conv(dbgi, node);