From: Sven Verdoolaege Date: Fri, 15 Feb 2013 15:05:25 +0000 (+0100) Subject: document that isl_local_space_get_div cannot be used on map spaces X-Git-Tag: isl-0.12~203 X-Git-Url: https://repo.or.cz/w/isl.git/commitdiff_plain/a27a0e2748ca6316268cb9d15da5f705b0423ff9 document that isl_local_space_get_div cannot be used on map spaces Signed-off-by: Sven Verdoolaege --- diff --git a/doc/user.pod b/doc/user.pod index a183d3f2..42d9c43d 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -950,6 +950,9 @@ They can be inspected, modified, copied and freed using the following functions. __isl_keep isl_local_space *ls); void *isl_local_space_free(__isl_take isl_local_space *ls); +Note that C can only be used on local spaces +of sets. + Two local spaces can be compared using int isl_local_space_is_equal(__isl_keep isl_local_space *ls1, diff --git a/isl_local_space.c b/isl_local_space.c index 6c4fb840..c9d6d75f 100644 --- a/isl_local_space.c +++ b/isl_local_space.c @@ -219,6 +219,9 @@ __isl_give isl_aff *isl_local_space_get_div(__isl_keep isl_local_space *ls, if (isl_int_is_zero(ls->div->row[pos][0])) isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, "expression of div unknown", return NULL); + if (!isl_local_space_is_set(ls)) + isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, + "cannot represent divs of map spaces", return NULL); aff = isl_aff_alloc(isl_local_space_copy(ls)); if (!aff)