Commit 86c405f6 authored by Matthias Braun's avatar Matthias Braun
Browse files

Always use unique numbers for types

Do not use the type address as number because that makes things
nondeterministic.
parent 2592525c
......@@ -121,9 +121,7 @@ static ir_type *new_type(tp_op const *type_op, ir_mode *mode)
res->align = 0;
res->visit = 0;
res->link = NULL;
#ifdef DEBUG_libfirm
res->nr = get_irp_new_node_nr();
#endif /* defined DEBUG_libfirm */
add_irp_type(res); /* Remember the new type global. */
......@@ -212,11 +210,7 @@ void set_type_mode(ir_type *tp, ir_mode *mode)
long get_type_nr(const ir_type *tp)
{
assert(is_type(tp));
#ifdef DEBUG_libfirm
return tp->nr;
#else
return (long)PTR_TO_INT(tp);
#endif
}
unsigned (get_type_size_bytes)(const ir_type *tp)
......
......@@ -146,10 +146,7 @@ struct ir_type {
type_dbg_info *dbi; /**< A pointer to information for debug support. */
ir_type *higher_type; /**< link to highlevel type in case of lowered
types */
#ifdef DEBUG_libfirm
long nr; /**< An unique node number for each node to make
output readable. */
#endif
long nr; /**< An unique number for each type. */
tp_attr attr; /**< Type kind specific fields. This must be the
last entry in this struct! Varying size! */
};
......
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