From a7009b33321361f2ac54b034465fc7333e43b80d Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 24 Nov 2016 17:03:26 +0100 Subject: [PATCH] isl_qpolynomial_set_dim_name: adjust to change of space Commit 3280c05 (make isl_pw_* object live in a map space, Tue Aug 30 16:47:59 2011 +0200) change the space of an isl_qpolynomial from as set space to a map space, but failed to adjust isl_qpolynomial_set_dim_name accordingly. Do so now. Signed-off-by: Sven Verdoolaege --- isl_polynomial.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/isl_polynomial.c b/isl_polynomial.c index d4821c58..c291e3ea 100644 --- a/isl_polynomial.c +++ b/isl_polynomial.c @@ -2676,6 +2676,12 @@ __isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name( qp = isl_qpolynomial_cow(qp); if (!qp) return NULL; + if (type == isl_dim_out) + isl_die(isl_qpolynomial_get_ctx(qp), isl_error_invalid, + "cannot set name of output/set dimension", + return isl_qpolynomial_free(qp)); + if (type == isl_dim_in) + type = isl_dim_set; qp->dim = isl_space_set_dim_name(qp->dim, type, pos, s); if (!qp->dim) goto error; -- 2.11.4.GIT