projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
init nr field for debug dump output
[libfirm]
/
ir
/
tr
/
entity.c
diff --git
a/ir/tr/entity.c
b/ir/tr/entity.c
index
90ffd8f
..
7c57f22
100644
(file)
--- a/
ir/tr/entity.c
+++ b/
ir/tr/entity.c
@@
-20,7
+20,7
@@
# include "typegmod_t.h"
# include "array.h"
/* All this is needed to build the constant node for methods: */
# include "typegmod_t.h"
# include "array.h"
/* All this is needed to build the constant node for methods: */
-# include "irprog.h"
+# include "irprog
_t
.h"
# include "ircons.h"
/*******************************************************************/
# include "ircons.h"
/*******************************************************************/
@@
-94,6
+94,10
@@
new_entity (type *owner, ident *name, type *type)
res->irg = NULL;
res->irg = NULL;
+#ifdef DEBUG_libfirm
+ res->nr = get_irp_new_node_nr();
+#endif
+
res->visit = 0;
/* Remember entity in it's owner. */
res->visit = 0;
/* Remember entity in it's owner. */
@@
-167,6
+171,17
@@
free_entity (entity *ent) {
free(ent);
}
free(ent);
}
+/* Outputs a unique number for this node */
+INLINE long
+get_entity_nr(entity *ent) {
+ assert(ent);
+#ifdef DEBUG_libfirm
+ return ent->nr;
+#else
+ return 0;
+#endif
+}
+
INLINE const char *
get_entity_name (entity *ent) {
assert (ent);
INLINE const char *
get_entity_name (entity *ent) {
assert (ent);