summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beirg.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-08-02 08:31:02 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2012-08-02 09:36:03 +0200
commite92c7244af11bc6e60edcc5801f0a6babd044ebe (patch)
treeea42e4cf9e0de77dd02ad6d243be4e5c6b9d6c94 /ir/be/beirg.h
parent0b94073dd21f4a3f013821b34d0440708daa41e2 (diff)
Assert that there is currently no object under construction, when calling be_get_be_obst().
Diffstat (limited to 'ir/be/beirg.h')
-rw-r--r--ir/be/beirg.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ir/be/beirg.h b/ir/be/beirg.h
index e87fae5..3be9065 100644
--- a/ir/be/beirg.h
+++ b/ir/be/beirg.h
@@ -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)