From: Götz Lindenmaier Date: Thu, 11 Nov 2004 09:26:50 +0000 (+0000) Subject: added constant value to unknown_entity X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=d3416afd9b21a06039e8fafd3c1c8d6e183f0876;p=libfirm added constant value to unknown_entity [r4366] --- diff --git a/ir/tr/Makefile.in b/ir/tr/Makefile.in index 1b2d1cccc..68de0dbc8 100644 --- a/ir/tr/Makefile.in +++ b/ir/tr/Makefile.in @@ -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 diff --git a/ir/tr/entity.c b/ir/tr/entity.c index 91041533a..1a75e0a12 100644 --- a/ir/tr/entity.c +++ b/ir/tr/entity.c @@ -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) || diff --git a/ir/tr/entity.h b/ir/tr/entity.h index 9de7abb6f..d91c79912 100644 --- a/ir/tr/entity.h +++ b/ir/tr/entity.h @@ -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