remove #ifdef HAVE_CONFIG_Hs
[libfirm] / ir / ir / irgraph.c
index c0852ca..226ae7b 100644 (file)
@@ -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 <string.h>
@@ -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;
 }