1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
4 ** Authors: Martin Trapp, Christian Schaefer
18 /* Make types visible to allow most efficient access */
19 # include "entity_t.h"
23 static struct obstack mangle_obst;
26 mangle_entity (entity *ent)
33 type_id = mangle_type ((type *) ent->owner);
34 xoprintf (&mangle_obst, "%I_%I", type_id, ent->name);
35 len = obstack_object_size (&mangle_obst);
36 cp = obstack_finish (&mangle_obst);
37 res = id_from_str (cp, len);
38 obstack_free (&mangle_obst, cp);
43 mangle_type (type *type)
49 assert (type->kind == k_type);
50 assert (type->type_op->code == tpo_class);
52 xoprintf (&mangle_obst, "%I", type->name);
53 len = obstack_object_size (&mangle_obst);
54 cp = obstack_finish (&mangle_obst);
55 res = id_from_str (cp, len);
56 obstack_free (&mangle_obst, cp);
64 obstack_init (&mangle_obst);