Commit 49ad2542 authored by Boris Boesler's avatar Boris Boesler
Browse files

*** empty log message ***

[r4586]
parent e5f0da85
......@@ -247,8 +247,8 @@ void free_callgraph(void) {
ir_graph *irg = get_irp_irg(i);
if (irg->callees) DEL_ARR_F(irg->callees);
if (irg->callers) DEL_ARR_F(irg->callers);
if (irg->callee_isbe) DEL_ARR_F(irg->callee_isbe);
if (irg->caller_isbe) DEL_ARR_F(irg->caller_isbe);
if (irg->callee_isbe) free(irg->callee_isbe);
if (irg->caller_isbe) free(irg->caller_isbe);
irg->callees = NULL;
irg->callers = NULL;
irg->callee_isbe = NULL;
......
......@@ -124,10 +124,9 @@ void add_irp_irg(ir_graph *irg) {
}
/* Removes irg from the list or irgs, shrinks the list by one. */
void remove_irp_irg(ir_graph *irg){
void remove_irp_irg_from_list(ir_graph *irg){
int i, found = false;
assert(irg);
free_ir_graph(irg);
for (i = 0; i < (ARR_LEN (irp->graphs)); i++) {
if (irp->graphs[i] == irg) {
found = true;
......@@ -151,6 +150,13 @@ void remove_irp_irg(ir_graph *irg){
}
}
/* Removes irg from the list or irgs, shrinks the list by one. */
void remove_irp_irg(ir_graph *irg){
assert(irg);
free_ir_graph(irg);
remove_irp_irg_from_list(irg);
}
int (get_irp_n_irgs)(void) {
return __get_irp_n_irgs();
}
......
......@@ -107,6 +107,9 @@ void set_irp_main_irg(ir_graph *main_irg);
/** Adds irg to the list of ir graphs in irp. */
void add_irp_irg(ir_graph *irg);
/** Removes irg from the list of irgs and
shrinks the list by one. */
void remove_irp_irg_from_list(ir_graph *irg);
/** Removes irg from the list of irgs, deallocates it and
shrinks the list by one. */
void remove_irp_irg(ir_graph *irg);
......
Supports Markdown
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