1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
4 ** Authors: Martin Trapp, Christian Schaefer
19 /* Make types visible to allow most efficient access */
20 # include "entity_t.h"
22 static struct obstack mangle_obst;
25 mangle_entity (entity *ent)
32 type_id = mangle_type ((type *) ent->owner);
33 xoprintf (&mangle_obst, "%I_%I", type_id, ent->name);
34 len = obstack_object_size (&mangle_obst);
35 cp = obstack_finish (&mangle_obst);
36 res = id_from_str (cp, len);
37 obstack_free (&mangle_obst, cp);
42 mangle_type (type *type)
48 assert (type->kind == k_type_class);
50 xoprintf (&mangle_obst, "%I", type->clss.name);
51 len = obstack_object_size (&mangle_obst);
52 cp = obstack_finish (&mangle_obst);
53 res = id_from_str (cp, len);
54 obstack_free (&mangle_obst, cp);
62 obstack_init (&mangle_obst);