X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Ftr%2Ftype_finalization.c;h=50f04ea35eefb9b5236a5a06df577ea7931c28ed;hb=226c238839ce84c2c310c8e7522838160c6f71af;hp=7fec33103ca6470cc2d5c68e4474c9653417d4d3;hpb=ce6161a7e42a48f7422b7babcc64d8ace18e2687;p=libfirm diff --git a/ir/tr/type_finalization.c b/ir/tr/type_finalization.c index 7fec33103..50f04ea35 100644 --- a/ir/tr/type_finalization.c +++ b/ir/tr/type_finalization.c @@ -1,28 +1,13 @@ /* - * Copyright (C) 1995-2008 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. */ /** - * @file type_finalization.c + * @file * @brief Calculate finalization of classes and entities by * inspecting the class hierarchy. * @author Michael Beck - * @version $Id$ */ #include "config.h" @@ -41,7 +26,7 @@ static void do_finalization(type_or_ent tore, void *env) if (is_type(tore.typ)) { ir_type *cls = tore.typ; - if (! is_Class_type(cls) || cls == glob_tp) + if (!is_Class_type(cls)) return; if (is_class_final(cls)) @@ -76,14 +61,8 @@ static void do_finalization(type_or_ent tore, void *env) 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()) @@ -91,6 +70,6 @@ void types_calc_finalization(void) 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()); }