From 6c2c42110431d16eab7ccaf14374da5776a473e6 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sun, 19 Feb 2012 16:55:12 +0100 Subject: [PATCH] ident: remove id_mangle_entity the ident module shouldn't have name-mangling policies builtin. --- include/libfirm/ident.h | 5 ----- ir/ident/mangle.c | 19 ------------------- 2 files changed, 24 deletions(-) diff --git a/include/libfirm/ident.h b/include/libfirm/ident.h index 0015feefe..f77e6daa2 100644 --- a/include/libfirm/ident.h +++ b/include/libfirm/ident.h @@ -110,11 +110,6 @@ FIRM_API int id_contains_char(ident *id, char c); */ FIRM_API ident *id_unique(const char *tag); -/** Computes a definite name for this entity by concatenating - the name of the owner type and the name of the entity with - a separating "_". */ -FIRM_API ident *id_mangle_entity(const ir_entity *ent); - /** mangle underscore: Returns a new ident that represents first_scnd. */ FIRM_API ident *id_mangle_u(ident *first, ident* scnd); diff --git a/ir/ident/mangle.c b/ir/ident/mangle.c index fd2af1a40..12a877c99 100644 --- a/ir/ident/mangle.c +++ b/ir/ident/mangle.c @@ -45,25 +45,6 @@ static inline ident *mangle_type(const ir_type *tp) return tp->name; } -ident *id_mangle_entity(const ir_entity *ent) -{ - ident *type_id; - char *cp; - int len; - ident *res; - - type_id = mangle_type(ent->owner); - obstack_grow(&mangle_obst, get_id_str(type_id), get_id_strlen(type_id)); - obstack_1grow(&mangle_obst,'_'); - obstack_grow(&mangle_obst, get_id_str(ent->name), get_id_strlen(ent->name)); - len = obstack_object_size(&mangle_obst); - cp = (char*)obstack_finish(&mangle_obst); - res = new_id_from_chars(cp, len); - obstack_free(&mangle_obst, cp); - return res; -} - - /* Returns a new ident that represents 'firstscnd'. */ ident *id_mangle(ident *first, ident *scnd) { -- 2.20.1