[CLASSES]: Set ->{fwd_decl_emitted,visited} to speed up lookups

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2006-12-23 21:44:55 -02:00
parent bbac253ab0
commit 2d7ec7cd35
1 changed files with 2 additions and 0 deletions

View File

@ -339,11 +339,13 @@ struct class *cus__find_fwd_decl(const struct cus *self, const char *name)
static void cus__add_definition(struct cus *self, struct class *class)
{
class->visited = 1;
list_add_tail(&class->node, &self->definitions);
}
static void cus__add_fwd_decl(struct cus *self, struct class *class)
{
class->fwd_decl_emitted = 1;
list_add_tail(&class->node, &self->fwd_decls);
}