From: Matthias Braun Date: Sat, 8 Jan 2011 12:32:25 +0000 (+0000) Subject: remove get_irn_modename, get_irn_modeident from public API. It's unclear why we need... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=0a805b86eef336b87ea2d3871e7a7928dec68b38;p=libfirm remove get_irn_modename, get_irn_modeident from public API. It's unclear why we need an explicit combination of get_irn_mode and get_mode_name [r28240] --- diff --git a/include/libfirm/irnode.h b/include/libfirm/irnode.h index b2c6e785b..b1a89a369 100644 --- a/include/libfirm/irnode.h +++ b/include/libfirm/irnode.h @@ -154,10 +154,6 @@ FIRM_API void del_Sync_n(ir_node *n, int i); FIRM_API void set_irn_mode(ir_node *node, ir_mode *mode); /** Gets the mode struct of a node. */ FIRM_API ir_mode *get_irn_mode(const ir_node *node); -/** Gets the ident for a string representation of the mode .*/ -FIRM_API ident *get_irn_modeident(const ir_node *node); -/** Gets the string representation of the mode .*/ -FIRM_API const char *get_irn_modename(const ir_node *node); /** Gets the opcode struct of the node. */ FIRM_API ir_op *get_irn_op(const ir_node *node); /** Sets the opcode struct of the node. */ diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index 158d341b6..fa660108c 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -372,19 +372,6 @@ void (set_irn_mode)(ir_node *node, ir_mode *mode) _set_irn_mode(node, mode); } -/** Gets the string representation of the mode .*/ -const char *get_irn_modename(const ir_node *node) -{ - assert(node); - return get_mode_name(node->mode); -} - -ident *get_irn_modeident(const ir_node *node) -{ - assert(node); - return get_mode_ident(node->mode); -} - ir_op *(get_irn_op)(const ir_node *node) { return _get_irn_op(node); diff --git a/ir/ir/irverify.c b/ir/ir/irverify.c index 6614caae4..ec368e7ea 100644 --- a/ir/ir/irverify.c +++ b/ir/ir/irverify.c @@ -97,6 +97,12 @@ static void show_entity_failure(ir_node *node) } } +static const char *get_irn_modename(const ir_node *node) +{ + ir_mode *mode = get_irn_mode(node); + return get_mode_name(mode); +} + /** * Prints a failure for a Node */