Added support for out edges.
[libfirm] / ir / tr / entity_t.h
index cf52d88..a9842c7 100644 (file)
@@ -43,6 +43,7 @@
 # include "entity.h"
 # include "typegmod.h"
 # include "mangle.h"
+# include "pseudo_irg.h"
 
 
 /** A path in a compund graph. */
@@ -50,7 +51,7 @@ struct compound_graph_path {
   firm_kind kind;       /**< dynamic type tag for compound graph path. */
   type *tp;             /**< The type this path belongs to. */
   int len;              /**< length of the path */
-  int *arr_indicees;    /**< List of array indicees.  To compute position of
+  int *arr_indicees;    /**< List of array indeces.  To compute position of
                  array elements */
   entity *nodes[1];     /**< List of entities of length len to express the
                  access path. */
@@ -62,7 +63,7 @@ struct entity {
   ident *name;          /**< name of this entity */
   ident *ld_name;       /**< Unique name of this entity, i.e., the mangled
                            name.  If the field is read before written a default
-                           magling is applies.  The name of the owner is prepended
+                           mangling is applies.  The name of the owner is prepended
                            to the name of the entity, separated by a underscore.
                            E.g.,  for a class `A' with field `a' this
                            is the ident for `A_a'. */
@@ -112,8 +113,7 @@ struct entity {
 
 #ifdef DEBUG_libfirm
   int nr;             /**< a unique node number for each node to make output
-             readable. */
-  char *c_name;                 /**< Since idents are ipaque, provide the name in cleartext */
+                           readable. */
 # endif /* DEBUG_libfirm */
 };
 
@@ -225,7 +225,7 @@ static INLINE void
 __set_entity_peculiarity(entity *ent, peculiarity pec) {
   assert(ent && ent->kind == k_entity);
   /* @@@ why peculiarity only for methods? */
-  assert(is_method_type(ent->type));
+  assert(is_Method_type(ent->type));
 
   ent->peculiarity = pec;
 }
@@ -283,7 +283,9 @@ __set_entity_link(entity *ent, void *l) {
 static INLINE ir_graph *
 __get_entity_irg(const entity *ent) {
   assert(ent && ent->kind == k_entity);
-  assert(is_method_type(ent->type));
+  assert(ent == unknown_entity || is_Method_type(ent->type));
+  if (!get_visit_pseudo_irgs() && ent->irg && is_pseudo_ir_graph(ent->irg))
+    return NULL;
   return ent->irg;
 }