/*
- * 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.
*/
/**
- * @file tr_inheritance.c
+ * @file
* @brief Utility routines for inheritance representation
* @author Goetz Lindenmaier
*/
for (i = 0; i < get_class_n_supertypes(clss); i++) {
super = get_class_supertype(clss, i);
- assert(is_Class_type(super) && "not a class");
for (j = 0; j < get_class_n_members(super); j++) {
inhent = get_class_member(super, j);
/* check whether inhent is already overwritten */
size_t i, n_subtypes, n_members, n_supertypes;
ir_visited_t master_visited = get_master_type_visited();
- assert(is_Class_type(tp));
-
set_type_visited(tp, master_visited-1);
/* Recursive descend. */
size_t i, n_subtypes, n_members, n_supertypes;
ir_visited_t master_visited = get_master_type_visited();
- assert(is_Class_type(tp));
-
set_type_visited(tp, master_visited-1);
/* Recursive descend. */
return res;
}
-
-
-
-/* ----------------------------------------------------------------------- */
-/* Class cast state handling. */
-/* ----------------------------------------------------------------------- */
-
-/* - State handling. ----------------------------------------- */
-
-void set_irg_class_cast_state(ir_graph *irg, ir_class_cast_state s)
-{
- if (get_irp_class_cast_state() > s)
- set_irp_class_cast_state(s);
- irg->class_cast_state = s;
-}
-
-ir_class_cast_state get_irg_class_cast_state(const ir_graph *irg)
-{
- return irg->class_cast_state;
-}
-
-void set_irp_class_cast_state(ir_class_cast_state s)
-{
-#ifndef NDEBUG
- size_t i, n;
- for (i = 0, n = get_irp_n_irgs(); i < n; ++i)
- assert(get_irg_class_cast_state(get_irp_irg(i)) >= s);
-#endif
- irp->class_cast_state = s;
-}
-
-ir_class_cast_state get_irp_class_cast_state(void)
-{
- return irp->class_cast_state;
-}