From: Sven Verdoolaege Date: Tue, 7 Feb 2012 11:13:23 +0000 (+0100) Subject: isl_printer_print_pw_aff: fix printing in C format X-Git-Tag: isl-0.10~8^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=916f4261e46a9c55558ccb35732d2b9212e41c4b;p=platform%2Fupstream%2Fisl.git isl_printer_print_pw_aff: fix printing in C format In 3280c05 (make isl_pw_* object live in a map space, Tue Aug 30 16:47:59 2011 +0200), the space in which objects live was changed from that of its domain to that of a map, but isl_printer_print_pw_aff was not changed accordingly. Signed-off-by: Sven Verdoolaege --- diff --git a/isl_output.c b/isl_output.c index 6883e7f..c75503e 100644 --- a/isl_output.c +++ b/isl_output.c @@ -2204,19 +2204,25 @@ static __isl_give isl_printer *print_pw_aff_c(__isl_take isl_printer *p, __isl_keep isl_pw_aff *pwaff) { int i; + isl_space *space; if (pwaff->n < 1) isl_die(p->ctx, isl_error_unsupported, "cannot print empty isl_pw_aff in C format", goto error); + space = isl_pw_aff_get_domain_space(pwaff); + if (!space) + goto error; for (i = 0; i < pwaff->n - 1; ++i) { p = isl_printer_print_str(p, "("); - p = print_set_c(p, pwaff->dim, pwaff->p[i].set); + p = print_set_c(p, space, pwaff->p[i].set); p = isl_printer_print_str(p, ") ? ("); p = print_aff_c(p, pwaff->p[i].aff); p = isl_printer_print_str(p, ") : "); } + isl_space_free(space); + return print_aff_c(p, pwaff->p[pwaff->n - 1].aff); error: isl_printer_free(p);