From bf92751cc0d5380fbe53a7c13a71234542891e8c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20W=C3=BCrdig?= Date: Mon, 4 Sep 2006 12:05:25 +0000 Subject: [PATCH] added call and set for determining cosntructor entities --- ir/be/bearch.c | 7 ++----- ir/be/bearch.h | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ir/be/bearch.c b/ir/be/bearch.c index 0ca10cc8b..7e0dc72df 100644 --- a/ir/be/bearch.c +++ b/ir/be/bearch.c @@ -320,9 +320,6 @@ extern char *arch_register_req_format(char *buf, size_t len, const arch_register return buf; } -int -arch_ent_is_constructor(const arch_env_t *arch_env, const entity * ent) -{ - - +int arch_ent_is_constructor(const arch_env_t *arch_env, const entity *ent) { + return pset_find_ptr(arch_env->constructor_entities, ent) != NULL; } diff --git a/ir/be/bearch.h b/ir/be/bearch.h index 1f3cc84bc..efd7fccf9 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -712,6 +712,7 @@ struct _arch_env_t { int handlers_tos; /**< The stack pointer of the handler stack. */ + pset *constructor_entities; /**< Set holding the entities of the constructor irgs */ }; /** @@ -751,6 +752,6 @@ extern const arch_irn_handler_t *arch_env_pop_irn_handler(arch_env_t *env); * @param ent The entity representing a function * @return 1 if function is a constructor */ -extern int arch_ent_is_constructor(const arch_env_t *arch_env, const entity * ent); +extern int arch_ent_is_constructor(const arch_env_t *arch_env, const entity *ent); #endif /* _FIRM_BEARCH_H */ -- 2.20.1