X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbestabs.c;h=a385da5d4d4af51829c01c7c80253c7e0890bca5;hb=5474a1c188c9d59eea2c915515980cd9cbab58d8;hp=8ba66babf12938cb55d9a515f188f5f4a54eeac4;hpb=4a91add53071efebc35ec6ec328a1264b2ff3084;p=libfirm diff --git a/ir/be/bestabs.c b/ir/be/bestabs.c index 8ba66babf..a385da5d4 100644 --- a/ir/be/bestabs.c +++ b/ir/be/bestabs.c @@ -130,19 +130,19 @@ typedef struct stabs_handle { */ static unsigned get_type_number(stabs_handle *h, ir_type *tp) { - pmap_entry *entry; + void *entry; unsigned num; if (tp == NULL) { /* map to the void type */ return 0; } - entry = pmap_find(h->type_map, tp); - if (! entry) { + entry = pmap_get(h->type_map, tp); + if (entry == NULL) { num = h->next_type_nr++; - pmap_insert(h->type_map, tp, INT_TO_PTR(num)); + pmap_insert(h->type_map, tp, INT_TO_PTR(num+1)); } else { - num = (unsigned)PTR_TO_INT(entry->value); + num = ((unsigned)PTR_TO_INT(entry))-1; } return num; } @@ -152,7 +152,7 @@ static unsigned get_type_number(stabs_handle *h, ir_type *tp) */ static void map_to_void(stabs_handle *h, ir_type *tp) { - pmap_insert(h->type_map, tp, INT_TO_PTR(0)); + pmap_insert(h->type_map, tp, INT_TO_PTR(1)); } /** @@ -517,7 +517,7 @@ static void walk_type(type_or_ent tore, void *ctx) tp = tore.typ; /* ignore the unknown type */ - if (tp == firm_unknown_type) + if (is_unknown_type(tp)) return; } else { return;