1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
4 ** Authors: Martin Trapp, Christian Schaefer
15 /* Make types visible to allow most efficient access */
16 # include "entity_t.h"
18 static struct obstack mangle_obst;
21 mangle_entity (entity *ent)
28 type_id = mangle_type ((type *) ent->owner);
29 xoprintf (&mangle_obst, "%I_%I", type_id, ent->name);
30 len = obstack_object_size (&mangle_obst);
31 cp = obstack_finish (&mangle_obst);
32 res = id_from_str (cp, len);
33 obstack_free (&mangle_obst, cp);
38 mangle_type (type *type)
44 assert (type->kind == k_type_class);
46 xoprintf (&mangle_obst, "%I", type->clss.name);
47 len = obstack_object_size (&mangle_obst);
48 cp = obstack_finish (&mangle_obst);
49 res = id_from_str (cp, len);
50 obstack_free (&mangle_obst, cp);
58 obstack_init (&mangle_obst);