Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
86c405f6
Commit
86c405f6
authored
Sep 08, 2015
by
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/tr/type.c
View file @
86c405f6
...
...
@@ -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
)
...
...
ir/tr/type_t.h
View file @
86c405f6
...
...
@@ -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! */
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment