summaryrefslogtreecommitdiffhomepage
path: root/ir/common
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-02-29 07:25:56 +0100
committerMatthias Braun <matze@braunis.de>2016-02-29 07:30:23 +0100
commit99c28678990cb92eed8c377ca3c6ed1073569dcf (patch)
tree3354b2edbdc713ae4ed31bb0d24d58c62d0d8ce2 /ir/common
parent851474f8da6b2b6021e3209d38993f5892d7100a (diff)
Use ir_printf("%F") instead of printf("%s",get_entity_name())
Diffstat (limited to 'ir/common')
-rw-r--r--ir/common/debugger.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ir/common/debugger.c b/ir/common/debugger.c
index fbd8233..bbea64e 100644
--- a/ir/common/debugger.c
+++ b/ir/common/debugger.c
@@ -619,12 +619,16 @@ static void check_ent_nr(ir_type *const type, ir_entity *const entity, void *con
/**
* Type-walker: Find an entity with given name.
*/
-static void check_ent_name(ir_type *const type, ir_entity *const entity, void *const ctx)
+static void check_ent_name(ir_type *const type, ir_entity *const entity,
+ void *const ctx)
{
(void)type;
+ if (entity == NULL)
+ return;
find_env_t *env = (find_env_t*)ctx;
- if (entity && streq(get_entity_name(entity), env->u.name))
+ const char *name = get_entity_name(entity);
+ if (streq(name, env->u.name))
env->res = entity;
}