* @brief Calculate finalization of classes and entities by
* inspecting the class hierarchy.
* @author Michael Beck
- * @version $Id$
*/
#include "config.h"
DEBUG_ONLY(static firm_dbg_module_t *dbg;)
-static void do_finalization(type_or_ent tore, void *env) {
- ir_type *glob_tp = env;
+static void do_finalization(type_or_ent tore, void *env)
+{
+ ir_type *glob_tp = (ir_type*)env;
if (is_type(tore.typ)) {
ir_type *cls = tore.typ;
get_compound_name(owner), get_entity_name(ent)));
}
}
-} /* do_finalization */
+}
-/**
- * If we have the closed world assumption, we can calculate the
- * finalization of classes and entities by inspecting the class hierarchy.
- * After this is done, all classes and entities that are not overridden
- * anymore have the final property set.
- */
-void types_calc_finalization(void) {
- if (! get_opt_closed_world())
- return;
+void types_calc_finalization(void)
+{
+ if (! get_opt_closed_world())
+ return;
FIRM_DBG_REGISTER(dbg, "firm.tr.finalization");
- /* types must be visited before it's entities */
+ /* types must be visited before their entities */
type_walk(do_finalization, NULL, get_glob_type());
}