/*
- * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved.
- *
* This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
*/
/**
if (entity->initializer != NULL) {
visit_initializer(entity->initializer);
- } else if (entity_has_compound_ent_values(entity)) {
- size_t i;
- size_t n_members = get_compound_ent_n_values(entity);
- for (i = 0; i < n_members; ++i) {
- ir_node *node = get_compound_ent_value(entity, i);
- start_visit_node(node);
- }
}
irg = get_entity_irg(entity);
}
/* remove graphs of non-visited functions
- * (we have to count backwards so we can safely call remove_irp_irg
- * while iterating) */
+ * (we have to count backwards, because freeing the graph moves the last
+ * graph in the list to the free position) */
for (i = get_irp_n_irgs(); i > 0;) {
ir_graph *irg = get_irp_irg(--i);
ir_entity *entity = get_irg_entity(irg);
continue;
DB((dbg, LEVEL_1, " freeing method %+F\n", entity));
- remove_irp_irg(irg);
+ free_ir_graph(irg);
}
/* we can now remove all non-visited (global) entities */