projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added initialization of fields
[libfirm]
/
ir
/
tr
/
entity.c
diff --git
a/ir/tr/entity.c
b/ir/tr/entity.c
index
24cee47
..
5cf9e2e
100644
(file)
--- a/
ir/tr/entity.c
+++ b/
ir/tr/entity.c
@@
-88,6
+88,8
@@
new_entity (type *owner, ident *name, type *type)
current_ir_graph = rem;
} else {
res->variability = uninitialized;
current_ir_graph = rem;
} else {
res->variability = uninitialized;
+ res->value = NULL;
+ res->values = NULL;
}
res->peculiarity = existent;
res->volatility = non_volatile;
}
res->peculiarity = existent;
res->volatility = non_volatile;
@@
-176,8
+178,10
@@
copy_entity_name (entity *old, ident *new_name) {
return new;
}
return new;
}
+
void
free_entity (entity *ent) {
void
free_entity (entity *ent) {
+ free_tv_entity(ent);
free_entity_attrs(ent);
free(ent);
}
free_entity_attrs(ent);
free(ent);
}