added call and set for determining cosntructor entities
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Mon, 4 Sep 2006 12:05:25 +0000 (12:05 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Mon, 4 Sep 2006 12:05:25 +0000 (12:05 +0000)
ir/be/bearch.c
ir/be/bearch.h

index 0ca10cc..7e0dc72 100644 (file)
@@ -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;
 }
index 1f3cc84..efd7fcc 100644 (file)
@@ -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 */