X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firargs.c;h=80d9404b68cea3469b16e2433eeb28d832578c1d;hb=169fd803ea2ed08171113c1fd7ab4e528e1ebc26;hp=42d4174beef5ee2c32aab9846270585a06bcb4a4;hpb=d6a1d8dac5bd201a1c63166d30f72a8f3fa56d90;p=libfirm diff --git a/ir/ir/irargs.c b/ir/ir/irargs.c index 42d4174be..80d9404b6 100644 --- a/ir/ir/irargs.c +++ b/ir/ir/irargs.c @@ -99,6 +99,7 @@ static int firm_emit(lc_appendable_t *app, char add[64]; char buf[256]; char tv[256]; + entity *ent; buf[0] = '\0'; add[0] = '\0'; @@ -161,23 +162,29 @@ static int firm_emit(lc_appendable_t *app, snprintf(buf, sizeof(buf), "%s%s", A("op"), get_op_name(X)); break; case k_ir_compound_graph_path: - strncat(buf, A("cgp"), sizeof(buf)); - n = get_compound_graph_path_length(X); + for (i = 0; i < n; ++i) { - entity *ent = get_compound_graph_path_node(X, i); + ent = get_compound_graph_path_node(X, i); + + strncat(buf, ".", sizeof(buf)); strncat(buf, get_entity_name(ent), sizeof(buf)); - if (i < n - 1) - strncat(buf, ".", sizeof(buf)); + if (is_Array_type(get_entity_owner(ent))) { + snprintf(add, sizeof(add), "[%d]", + get_compound_graph_path_array_index(X, i)); + strncat(buf, add, sizeof(buf)); + } } + add[0] = '\0'; break; + default: snprintf(buf, sizeof(buf), "UNKWN"); snprintf(add, sizeof(add), "[%p]", X); } } - if(occ->flag_plus) + if (occ->flag_plus) strncat(buf, add, sizeof(buf)); return lc_arg_append(app, occ, buf, strlen(buf)); @@ -251,6 +258,7 @@ lc_arg_env_t *firm_get_arg_env(void) X("mode", 'm'), X("block", 'B'), X("pnc", '='), + X("cg_path", 'P'), }; int i;