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