From 533c124f51682b07a0f527b14e6c8b17f83de632 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 22 Jul 2005 12:33:01 +0000 Subject: [PATCH] fixed dump_blk_to_cfg() uninitialized var filename for vcg files must always use the ld_name, even is the option dump_ld_name is not set [r6276] --- ir/ir/irdump.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 7c3be782b..4f26adb5a 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -426,10 +426,10 @@ static void clear_link(ir_node * node, void * env) { } /** - * If the entity has a ld_name, returns it if the option dump_ld_name is set, + * If the entity has a ld_name, returns it if the dump_ld_name is set, * else returns the name of the entity. */ -const char *get_ent_dump_name(entity *ent) { +static const char *_get_ent_dump_name(entity *ent, int dump_ld_name) { if (!ent) return ""; if (dump_ld_name) { @@ -439,11 +439,18 @@ const char *get_ent_dump_name(entity *ent) { return get_id_str(ent->name); } +/** + * If the entity has a ld_name, returns it if the option dump_ld_name is set, + * else returns the name of the entity. + */ +const char *get_ent_dump_name(entity *ent) { + return _get_ent_dump_name(ent, dump_ld_name); +} + /* Returns the name of an IRG. */ const char *get_irg_dump_name(ir_graph *irg) { /* Don't use get_entity_ld_ident (ent) as it computes the mangled name! */ - entity *ent = get_irg_entity(irg); - return get_ent_dump_name(ent); + return _get_ent_dump_name(get_irg_entity(irg), 1); } /** @@ -2347,7 +2354,7 @@ dump_ir_block_graph_w_types (ir_graph *irg, const char *suffix) static void dump_block_to_cfg(ir_node *block, void *env) { FILE *F = env; - int i, fl; + int i, fl = 0; ir_node *pred; if (is_Block(block)) { -- 2.20.1