X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firgraph.c;h=226ae7b98de075afa9dc2b5b6169289ff2b5d3c6;hb=bb9f2e36362333c6635b89f5258171b06c786608;hp=c0852caa3b90a3e37d2c90de0ef6ada076cc49ac;hpb=86e761ab84e9d929821dd977f6395cb21b89cde1;p=libfirm diff --git a/ir/ir/irgraph.c b/ir/ir/irgraph.c index c0852caa3..226ae7b98 100644 --- a/ir/ir/irgraph.c +++ b/ir/ir/irgraph.c @@ -23,9 +23,7 @@ * @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck * @version $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "config.h" #ifdef HAVE_STRING_H # include @@ -195,7 +193,7 @@ ir_graph *new_r_ir_graph(ir_entity *ent, int n_loc) { /*-- initialized for each graph. --*/ res->kind = k_ir_graph; - res->obst = xmalloc (sizeof(*res->obst)); + res->obst = XMALLOC(struct obstack); obstack_init(res->obst); res->phase_state = phase_building; @@ -320,7 +318,7 @@ ir_graph *new_const_code_irg(void) { #if USE_EXPLICIT_PHI_IN_STACK res->Phi_in_stack = NULL; #endif - res->obst = xmalloc(sizeof(*res->obst)); + res->obst = XMALLOC(struct obstack); obstack_init (res->obst); res->extbb_obst = NULL; @@ -471,7 +469,7 @@ ir_graph *create_irg_copy(ir_graph *irg) { #if USE_EXPLICIT_PHI_IN_STACK res->Phi_in_stack = NULL; #endif - res->obst = xmalloc(sizeof(*res->obst)); + res->obst = XMALLOC(struct obstack); obstack_init(res->obst); res->extbb_obst = NULL; @@ -1035,7 +1033,7 @@ void set_irg_loc_description(ir_graph *irg, int n, void *description) { assert(0 <= n && n < irg->n_loc); if (! irg->loc_descriptions) - irg->loc_descriptions = xcalloc(sizeof(*irg->loc_descriptions), irg->n_loc); + irg->loc_descriptions = XMALLOCNZ(void*, irg->n_loc); irg->loc_descriptions[n] = description; }