Commit 4022220a authored by Manuel Mohr's avatar Manuel Mohr
Browse files

Check Address entity before formatting it.

Before, printing an Address node that did have an entity attribute set
yet crashed.  Unfortunately, when using the debug extensions to break on
the creation of an Address node, the attribute was not yet set and the
debug helper still wanted to print the node, which crashed.
parent a5c95143
......@@ -180,8 +180,9 @@ static int firm_emit(lc_appendable_t *app, const lc_arg_occ_t *occ,
snprintf(buf, sizeof(buf), "%s%s %s<%s>", A("irn"), get_irn_opname(node),
get_mode_name(get_irn_mode(node)), tv_buf);
} else if (is_Address(node)) {
const char *entity_name = get_entity_name_or_null_str(get_Address_entity(node));
snprintf(buf, sizeof(buf), "%s%s %s[%s]", A("irn"), get_irn_opname(node),
get_mode_name(get_irn_mode(node)), get_entity_name(get_Address_entity(node)));
get_mode_name(get_irn_mode(node)), entity_name);
} else if (is_Member(node)) {
const char *entity_name = get_entity_name_or_null_str(get_Member_entity(node));
snprintf(buf, sizeof(buf), "%s%s %s[%s]", A("irn"), get_irn_opname(node),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment