Commit bbd65eef authored by Andreas Fried's avatar Andreas Fried
Browse files

Make arguments of is_SubClass_of constant.

parent 80f96382
......@@ -796,7 +796,7 @@ FIRM_API tp_opcode get_tpop_code(const tp_op *op);
* a subclass of high. I.e, we search in all subtypes of high for low.
* @@@ this can be implemented more efficient if we know the set of all
* subclasses of high. */
FIRM_API int is_SubClass_of(ir_type *low, ir_type *high);
FIRM_API int is_SubClass_of(const ir_type *low, const ir_type *high);
/** Subclass check for pointers to classes.
......@@ -375,7 +375,7 @@ ir_entity *get_entity_trans_overwrites_next(const ir_entity *ent)
/* ----------------------------------------------------------------------- */
/** Returns true if low is subclass of high. */
static int check_is_SubClass_of(ir_type *low, ir_type *high)
static int check_is_SubClass_of(const ir_type *low, const ir_type *high)
/* depth first search from high downwards. */
for (size_t i = 0, n_subtypes = get_class_n_subtypes(high);
......@@ -388,7 +388,7 @@ static int check_is_SubClass_of(ir_type *low, ir_type *high)
return 0;
int is_SubClass_of(ir_type *low, ir_type *high)
int is_SubClass_of(const ir_type *low, const ir_type *high)
assert(is_Class_type(low) && is_Class_type(high));
if (low == high)
Markdown is supported
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