added constant value to unknown_entity
authorGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Thu, 11 Nov 2004 09:26:50 +0000 (09:26 +0000)
committerGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Thu, 11 Nov 2004 09:26:50 +0000 (09:26 +0000)
[r4366]

ir/tr/Makefile.in
ir/tr/entity.c
ir/tr/entity.h

index 1b2d1cc..68de0db 100644 (file)
@@ -30,7 +30,7 @@ include $(topdir)/MakeRules
 CPPFLAGS += -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/adt \
            -I$(top_srcdir)/ir/debug  -I$(top_srcdir)/ir/ir    -I$(top_srcdir)/ir/tv  \
            -I$(top_srcdir)/ir/st     -I$(top_srcdir)/ir/ana   -I$(top_srcdir)/ir/opt \
-           -I$(top_srcdir)/ir/stat
+           -I$(top_srcdir)/ir/stat -I$(top_srcdir)/ir/external
 
 include $(top_srcdir)/MakeTargets
 
index 9104153..1a75e0a 100644 (file)
@@ -50,6 +50,11 @@ init_entity (void)
   unknown_entity = new_rd_entity(NULL, unknown_type, new_id_from_str(UNKNOWN_ENTITY_NAME), unknown_type);
   set_entity_visibility(unknown_entity, visibility_external_allocated);
   set_entity_ld_ident(unknown_entity, get_entity_ident(unknown_entity));
+
+  symconst_symbol sym;
+  sym.entity_p = unknown_entity;
+  current_ir_graph = get_const_code_irg();
+  unknown_entity->value = new_SymConst(sym, symconst_addr_ent);
 }
 
 
@@ -1131,7 +1136,8 @@ set_entity_irg(entity *ent, ir_graph *irg) {
   assert(ent && is_method_type(get_entity_type(ent)));
   /* Wie kann man die Referenz auf einen IRG löschen, z.B. wenn die
    * Methode selbst nicht mehr aufgerufen werden kann, die Entität
-   * aber erhalten bleiben soll. */
+   * aber erhalten bleiben soll?  Wandle die Entitaet in description oder
+   * inherited um! */
   /* assert(irg); */
   assert((irg  && ent->peculiarity == peculiarity_existent) ||
          (!irg && ent->peculiarity == peculiarity_description) ||
index 9de7abb..d91c799 100644 (file)
@@ -551,7 +551,7 @@ entity *resolve_ent_polymorphy(type *dynamic_class, entity* static_ent);
  *    visibility    = visibility_external_allocated
  *    offset        = -1
  *    variability   = variability_uninitialized
- *    value         = NULL
+ *    value         = SymConst(unknown_entity)
  *    values        = NULL
  *    val_paths     = NULL
  *    peculiarity   = peculiarity_existent