Assert that there is currently no object under construction, when calling be_get_be_o...
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 2 Aug 2012 06:31:02 +0000 (08:31 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 2 Aug 2012 07:36:03 +0000 (09:36 +0200)
ir/be/beirg.h
ir/be/sparc/sparc_transform.c

index e87fae5..3be9065 100644 (file)
@@ -134,8 +134,10 @@ static inline const arch_env_t *be_get_irg_arch_env(const ir_graph *irg)
 
 static inline struct obstack *be_get_be_obst(const ir_graph *irg)
 {
-       be_irg_t *birg = be_birg_from_irg(irg);
-       return &birg->obst;
+       be_irg_t       *const birg = be_birg_from_irg(irg);
+       struct obstack *const obst = &birg->obst;
+       assert(obstack_object_size(obst) == 0);
+       return obst;
 }
 
 static inline be_stack_layout_t *be_get_irg_stack_layout(const ir_graph *irg)
index afa819f..052df93 100644 (file)
@@ -1521,7 +1521,6 @@ static ir_node *gen_Start(ir_node *node)
        size_t     i;
 
        /* start building list of start constraints */
-       assert(obstack_object_size(obst) == 0);
 
        /* calculate number of outputs */
        n_outs = 4; /* memory, g0, g7, sp */