Commit 86d52903 authored by Matthias Braun's avatar Matthias Braun
Browse files

plug more leaks

parent 274626e2
......@@ -265,6 +265,8 @@ static void list_sched_block(ir_node *block, void *env_ptr)
add_to_sched(&be, irn);
}
ir_nodeset_destroy(cands);
if (selector->finish_block)
selector->finish_block(be.selector_block_env);
}
......
......@@ -121,11 +121,15 @@ void ir_init(void)
void ir_finish(void)
{
#ifdef DEBUG_libfirm
firm_finish_debugger();
#endif
free_ir_prog();
finish_tarval();
finish_mode();
finish_tpop();
firm_finish_mangle();
finish_ident();
firm_be_finish();
......
......@@ -1280,6 +1280,12 @@ void firm_init_debugger(void)
firm_debug_break();
}
void firm_finish_debugger(void)
{
del_set(bp_numbers);
del_set(bp_idents);
}
/**
* A gdb helper function to print firm objects.
*/
......
......@@ -43,6 +43,8 @@ void firm_break(const char *cmd);
/** Creates the debugger tables. */
void firm_init_debugger(void);
void firm_finish_debugger(void);
/**
* @defgroup external_debug helper functions for debuggers
*
......
......@@ -40,4 +40,6 @@ void finish_ident(void);
/** initializes the name mangling code */
void firm_init_mangle(void);
void firm_finish_mangle(void);
#endif
......@@ -156,3 +156,8 @@ void firm_init_mangle(void)
{
obstack_init(&mangle_obst);
}
void firm_finish_mangle(void)
{
obstack_free(&mangle_obst, NULL);
}
......@@ -165,6 +165,7 @@ static void analyse_switch1(switch_info_t *info)
info->default_block = targets[pn_Switch_default];
info->cases = cases;
free(targets);
}
static void normalize_table(ir_node *switchn, ir_mode *new_mode,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment